Skip to content

Commit 80943bb

Browse files
committed
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>
1 parent 2d91123 commit 80943bb

13 files changed

Lines changed: 15 additions & 15 deletions

drivers/pwm/pwm-bcm-kona.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ static int kona_pwmc_apply(struct pwm_chip *chip, struct pwm_device *pwm,
260260
return err;
261261
}
262262

263-
err = kona_pwmc_config(pwm->chip, pwm, state->duty_cycle, state->period);
263+
err = kona_pwmc_config(chip, pwm, state->duty_cycle, state->period);
264264
if (err && !pwm->state.enabled)
265265
clk_disable_unprepare(kp->clk);
266266

drivers/pwm/pwm-img.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ static int img_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
196196
return 0;
197197
}
198198

199-
err = img_pwm_config(pwm->chip, pwm, state->duty_cycle, state->period);
199+
err = img_pwm_config(chip, pwm, state->duty_cycle, state->period);
200200
if (err)
201201
return err;
202202

drivers/pwm/pwm-jz4740.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ static void jz4740_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm)
123123
static int jz4740_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
124124
const struct pwm_state *state)
125125
{
126-
struct jz4740_pwm_chip *jz = to_jz4740(pwm->chip);
126+
struct jz4740_pwm_chip *jz = to_jz4740(chip);
127127
unsigned long long tmp = 0xffffull * NSEC_PER_SEC;
128128
struct clk *clk = jz->clk[pwm->hwpwm];
129129
unsigned long period, duty;

drivers/pwm/pwm-lpc18xx-sct.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ static int lpc18xx_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
328328
return 0;
329329
}
330330

331-
err = lpc18xx_pwm_config(pwm->chip, pwm, state->duty_cycle, state->period);
331+
err = lpc18xx_pwm_config(chip, pwm, state->duty_cycle, state->period);
332332
if (err)
333333
return err;
334334

drivers/pwm/pwm-lpc32xx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ static int lpc32xx_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
103103
return 0;
104104
}
105105

106-
err = lpc32xx_pwm_config(pwm->chip, pwm, state->duty_cycle, state->period);
106+
err = lpc32xx_pwm_config(chip, pwm, state->duty_cycle, state->period);
107107
if (err)
108108
return err;
109109

drivers/pwm/pwm-mediatek.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ static int pwm_mediatek_apply(struct pwm_chip *chip, struct pwm_device *pwm,
217217
return 0;
218218
}
219219

220-
err = pwm_mediatek_config(pwm->chip, pwm, state->duty_cycle, state->period);
220+
err = pwm_mediatek_config(chip, pwm, state->duty_cycle, state->period);
221221
if (err)
222222
return err;
223223

drivers/pwm/pwm-renesas-tpu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ static int tpu_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
416416
return 0;
417417
}
418418

419-
err = tpu_pwm_config(pwm->chip, pwm,
419+
err = tpu_pwm_config(chip, pwm,
420420
state->duty_cycle, state->period, enabled);
421421
if (err)
422422
return err;

drivers/pwm/pwm-sti.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ static int sti_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
407407
return 0;
408408
}
409409

410-
err = sti_pwm_config(pwm->chip, pwm, state->duty_cycle, state->period);
410+
err = sti_pwm_config(chip, pwm, state->duty_cycle, state->period);
411411
if (err)
412412
return err;
413413

drivers/pwm/pwm-stmpe.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ static int stmpe_24xx_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
275275
return 0;
276276
}
277277

278-
err = stmpe_24xx_pwm_config(pwm->chip, pwm, state->duty_cycle, state->period);
278+
err = stmpe_24xx_pwm_config(chip, pwm, state->duty_cycle, state->period);
279279
if (err)
280280
return err;
281281

drivers/pwm/pwm-tegra.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ static int tegra_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
256256
return 0;
257257
}
258258

259-
err = tegra_pwm_config(pwm->chip, pwm, state->duty_cycle, state->period);
259+
err = tegra_pwm_config(chip, pwm, state->duty_cycle, state->period);
260260
if (err)
261261
return err;
262262

0 commit comments

Comments
 (0)