mirror of
https://github.com/torvalds/linux.git
synced 2024-11-26 06:02:05 +00:00
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. Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
This commit is contained in:
parent
2d91123ae5
commit
80943bbdcf
@ -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);
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user