pwm: Stop referencing pwm->chip
Subsystems (9)
PATCH v2 1/1 pwm: Stop referencing pwm->chip
Drivers have access to the chip via a function argument already, so there is no need to reference it via the PWM device.
Signed-off-by Thierry Reding <[email protected]>
---
Changes in v2:
- add missing cleanup in pwm-jz4740.c (Uwe)
drivers/pwm/pwm-bcm-kona.c | 2 +- drivers/pwm/pwm-img.c | 2 +- drivers/pwm/pwm-jz4740.c | 2 +- drivers/pwm/pwm-lpc18xx-sct.c | 2 +- drivers/pwm/pwm-lpc32xx.c | 2 +- drivers/pwm/pwm-mediatek.c | 2 +- drivers/pwm/pwm-renesas-tpu.c | 2 +- drivers/pwm/pwm-sti.c | 2 +- drivers/pwm/pwm-stmpe.c | 2 +- drivers/pwm/pwm-tegra.c | 2 +- drivers/pwm/pwm-twl-led.c | 4 ++-- drivers/pwm/pwm-twl.c | 4 ++-- drivers/pwm/pwm-vt8500.c | 2 +- 13 files changed, 15 insertions(+), 15 deletions(-)
drivers/pwm/pwm-bcm-kona.c +1 -1
@@ -260,7 +260,7 @@ static int kona_pwmc_apply(struct pwm_chip *chip, struct pwm_device *pwm,return err; } - err =kona_pwmc_config (pwm->chip, pwm, state->duty_cycle, state->period); + err =kona_pwmc_config (chip, pwm, state->duty_cycle, state->period);if (err && !pwm->state.enabled)clk_disable_unprepare (kp->clk);
drivers/pwm/pwm-img.c +1 -1
@@ -196,7 +196,7 @@ static int img_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,return 0 ; } - err =img_pwm_config (pwm->chip, pwm, state->duty_cycle, state->period); + err =img_pwm_config (chip, pwm, state->duty_cycle, state->period);if (err)return err;
drivers/pwm/pwm-jz4740.c +1 -1
@@ -123,7 +123,7 @@ static void jz4740_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm)static int jz4740_pwm_apply (struct pwm_chip *chip,struct pwm_device *pwm,const struct pwm_state *state) { -struct jz4740_pwm_chip *jz =to_jz4740 (pwm->chip); +struct jz4740_pwm_chip *jz =to_jz4740 (chip);unsigned long long tmp =0xffffull *NSEC_PER_SEC ;struct clk *clk = jz->clk[pwm->hwpwm];unsigned long period, duty;
drivers/pwm/pwm-lpc18xx-sct.c +1 -1
@@ -328,7 +328,7 @@ static int lpc18xx_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,return 0 ; } - err =lpc18xx_pwm_config (pwm->chip, pwm, state->duty_cycle, state->period); + err =lpc18xx_pwm_config (chip, pwm, state->duty_cycle, state->period);if (err)return err;
drivers/pwm/pwm-lpc32xx.c +1 -1
@@ -103,7 +103,7 @@ static int lpc32xx_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,return 0 ; } - err =lpc32xx_pwm_config (pwm->chip, pwm, state->duty_cycle, state->period); + err =lpc32xx_pwm_config (chip, pwm, state->duty_cycle, state->period);if (err)return err;
drivers/pwm/pwm-mediatek.c +1 -1
@@ -217,7 +217,7 @@ static int pwm_mediatek_apply(struct pwm_chip *chip, struct pwm_device *pwm,return 0 ; } - err =pwm_mediatek_config (pwm->chip, pwm, state->duty_cycle, state->period); + err =pwm_mediatek_config (chip, pwm, state->duty_cycle, state->period);if (err)return err;
drivers/pwm/pwm-renesas-tpu.c +1 -1
@@ -416,7 +416,7 @@ static int tpu_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,return 0 ; } - err =tpu_pwm_config (pwm->chip, pwm, + err =tpu_pwm_config (chip, pwm, state->duty_cycle, state->period, enabled);if (err)return err;
drivers/pwm/pwm-sti.c +1 -1
@@ -407,7 +407,7 @@ static int sti_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,return 0 ; } - err =sti_pwm_config (pwm->chip, pwm, state->duty_cycle, state->period); + err =sti_pwm_config (chip, pwm, state->duty_cycle, state->period);if (err)return err;
drivers/pwm/pwm-stmpe.c +1 -1
@@ -275,7 +275,7 @@ static int stmpe_24xx_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,return 0 ; } - err =stmpe_24xx_pwm_config (pwm->chip, pwm, state->duty_cycle, state->period); + err =stmpe_24xx_pwm_config (chip, pwm, state->duty_cycle, state->period);if (err)return err;
drivers/pwm/pwm-tegra.c +1 -1
@@ -256,7 +256,7 @@ static int tegra_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,return 0 ; } - err =tegra_pwm_config (pwm->chip, pwm, state->duty_cycle, state->period); + err =tegra_pwm_config (chip, pwm, state->duty_cycle, state->period);if (err)return err;
drivers/pwm/pwm-twl-led.c +2 -2
@@ -175,7 +175,7 @@ static int twl4030_pwmled_apply(struct pwm_chip *chip, struct pwm_device *pwm,* pwm_apply_state because of !state->enabled and so the two values in * pwm->state might not be configured in hardware. */ - ret =twl4030_pwmled_config (pwm->chip, pwm, + ret =twl4030_pwmled_config (chip, pwm, state->duty_cycle, state->period);if (ret)return ret;
@@ -275,7 +275,7 @@ static int twl6030_pwmled_apply(struct pwm_chip *chip, struct pwm_device *pwm,return 0 ; } - err =twl6030_pwmled_config (pwm->chip, pwm, + err =twl6030_pwmled_config (chip, pwm, state->duty_cycle, state->period);if (err)return err;
drivers/pwm/pwm-twl.c +2 -2
@@ -294,7 +294,7 @@ static int twl4030_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,return 0 ; } - err =twl_pwm_config (pwm->chip, pwm, state->duty_cycle, state->period); + err =twl_pwm_config (chip, pwm, state->duty_cycle, state->period);if (err)return err;
@@ -319,7 +319,7 @@ static int twl6030_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,return 0 ; } - err =twl_pwm_config (pwm->chip, pwm, state->duty_cycle, state->period); + err =twl_pwm_config (chip, pwm, state->duty_cycle, state->period);if (err)return err;
drivers/pwm/pwm-vt8500.c +1 -1
@@ -209,7 +209,7 @@ static int vt8500_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,* pwm_apply_state because of !state->enabled and so the two values in * pwm->state might not be configured in hardware. */ - err =vt8500_pwm_config (pwm->chip, pwm, state->duty_cycle, state->period); + err =vt8500_pwm_config (chip, pwm, state->duty_cycle, state->period);if (err)return err;
Signature · 1 line
2.42.0
Quoted 4 lines · Thierry Reding
Drivers have access to the chip via a function argument already, so there is no need to reference it via the PWM device.
Signed-off-by Thierry Reding <[email protected]>
Reviewed-by Uwe Kleine-König <[email protected]>
Best regards
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | https://www.pengutronix.de/ |