Commit 80943bbd authored by Thierry Reding's avatar Thierry Reding
Browse files

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: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: default avatarThierry Reding <thierry.reding@gmail.com>
parent 2d91123a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);

+1 −1
Original line number Diff line number Diff line
@@ -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;

+1 −1
Original line number Diff line number Diff line
@@ -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;
+1 −1
Original line number Diff line number Diff line
@@ -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;

+1 −1
Original line number Diff line number Diff line
@@ -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;

Loading