Skip to content

Commit 68e34b3

Browse files
author
Uwe Kleine-König
committed
pwm: vt8500: Make use of pwmchip_parent() accessor
struct pwm_chip::dev is about to change. To not have to touch this driver in the same commit as struct pwm_chip::dev, use the accessor function provided for exactly this purpose. Link: https://lore.kernel.org/r/c3c45a08f2ccb8bb13b4042c73f93064876586eb.1707900770.git.u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König <[email protected]>
1 parent 9767db3 commit 68e34b3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/pwm/pwm-vt8500.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ static inline void vt8500_pwm_busy_wait(struct pwm_chip *chip, int nr, u8 bitmas
6363
cpu_relax();
6464

6565
if (unlikely(!loops))
66-
dev_warn(chip->dev, "Waiting for status bits 0x%x to clear timed out\n",
66+
dev_warn(pwmchip_parent(chip), "Waiting for status bits 0x%x to clear timed out\n",
6767
mask);
6868
}
6969

@@ -78,7 +78,7 @@ static int vt8500_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,
7878

7979
err = clk_enable(vt8500->clk);
8080
if (err < 0) {
81-
dev_err(chip->dev, "failed to enable clock\n");
81+
dev_err(pwmchip_parent(chip), "failed to enable clock\n");
8282
return err;
8383
}
8484

@@ -129,7 +129,7 @@ static int vt8500_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm)
129129

130130
err = clk_enable(vt8500->clk);
131131
if (err < 0) {
132-
dev_err(chip->dev, "failed to enable clock\n");
132+
dev_err(pwmchip_parent(chip), "failed to enable clock\n");
133133
return err;
134134
}
135135

0 commit comments

Comments
 (0)