mirror of
https://github.com/torvalds/linux.git
synced 2026-05-25 23:52:08 +02:00
pwm: sun4i: 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. Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com> Link: https://lore.kernel.org/r/3ddaec73f3abefb45625d0a469026fa8d13da8c0.1707900770.git.u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
This commit is contained in:
parent
f20fb5c858
commit
d6ada1d4ca
|
|
@ -245,7 +245,7 @@ static int sun4i_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
|
|||
if (!cstate.enabled) {
|
||||
ret = clk_prepare_enable(sun4i_pwm->clk);
|
||||
if (ret) {
|
||||
dev_err(chip->dev, "failed to enable PWM clock\n");
|
||||
dev_err(pwmchip_parent(chip), "failed to enable PWM clock\n");
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
|
@ -253,7 +253,7 @@ static int sun4i_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
|
|||
ret = sun4i_pwm_calculate(sun4i_pwm, state, &duty, &period, &prescaler,
|
||||
&bypass);
|
||||
if (ret) {
|
||||
dev_err(chip->dev, "period exceeds the maximum value\n");
|
||||
dev_err(pwmchip_parent(chip), "period exceeds the maximum value\n");
|
||||
if (!cstate.enabled)
|
||||
clk_disable_unprepare(sun4i_pwm->clk);
|
||||
return ret;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user