1

pwm: sifive: 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/170c3c61707992cbc57dce31f70c168fcd3dbe51.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
This commit is contained in:
Uwe Kleine-König 2024-02-14 10:32:31 +01:00
parent bb472da214
commit c4f4af7d79

View File

@ -186,7 +186,7 @@ static int pwm_sifive_apply(struct pwm_chip *chip, struct pwm_device *pwm,
if (!enabled) { if (!enabled) {
ret = clk_enable(ddata->clk); ret = clk_enable(ddata->clk);
if (ret) { if (ret) {
dev_err(chip->dev, "Enable clk failed\n"); dev_err(pwmchip_parent(chip), "Enable clk failed\n");
return ret; return ret;
} }
} }