diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2024-02-14 10:32:29 +0100 |
---|---|---|
committer | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2024-02-19 11:04:14 +0100 |
commit | c63f0bbbc99dcf1391f1d8a6e9c2aa66ba143d84 (patch) | |
tree | b682e7c93f95b55f4c23eb89f0291eee048226a2 /drivers/pwm/pwm-sifive.c | |
parent | pwm: samsung: Make use of devm_pwmchip_alloc() function (diff) | |
download | linux-c63f0bbbc99dcf1391f1d8a6e9c2aa66ba143d84.tar.xz linux-c63f0bbbc99dcf1391f1d8a6e9c2aa66ba143d84.zip |
pwm: sifive: Simplify code to determine the pwmchip's parent device
There is already a pointer to the pwmchip, make use of it directly
instead of using the struct pwm_sifive_ddata *ddata just obtained from
it. This also has the advantage of not using struct
pwm_sifive_ddata::chip any more which will be dropped soon.
Link: https://lore.kernel.org/r/78da5070d3ff5767da6f1c053d069c1e25229375.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Diffstat (limited to 'drivers/pwm/pwm-sifive.c')
-rw-r--r-- | drivers/pwm/pwm-sifive.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pwm/pwm-sifive.c b/drivers/pwm/pwm-sifive.c index 089e50bdbbf0..cf00f902fc30 100644 --- a/drivers/pwm/pwm-sifive.c +++ b/drivers/pwm/pwm-sifive.c @@ -185,7 +185,7 @@ static int pwm_sifive_apply(struct pwm_chip *chip, struct pwm_device *pwm, if (!enabled) { ret = clk_enable(ddata->clk); if (ret) { - dev_err(ddata->chip.dev, "Enable clk failed\n"); + dev_err(chip->dev, "Enable clk failed\n"); return ret; } } |