mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-04 08:17:46 +00:00
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>
This commit is contained in:
parent
6727fdf748
commit
c63f0bbbc9
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue