diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2024-02-14 10:33:03 +0100 |
---|---|---|
committer | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2024-02-22 14:39:26 +0100 |
commit | b514a1b29df8aadba641f8cb8153aa386489eb37 (patch) | |
tree | 03051964958fe2aa49cdeb9c5c97dfe972ae8448 /drivers/pwm/pwm-tiehrpwm.c | |
parent | pwm: tiecap: Make use of devm_pwmchip_alloc() function (diff) | |
download | linux-b514a1b29df8aadba641f8cb8153aa386489eb37.tar.xz linux-b514a1b29df8aadba641f8cb8153aa386489eb37.zip |
pwm: tiehrpwm: 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 ehrpwm_pwm_chip *ddata just obtained from
it. This also has the advantage of not using struct
ehrpwm_pwm_chip::chip any more which will be dropped soon.
Link: https://lore.kernel.org/r/b2b06a3aabf8c04969d59ddf7ba565b303855878.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-tiehrpwm.c')
-rw-r--r-- | drivers/pwm/pwm-tiehrpwm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pwm/pwm-tiehrpwm.c b/drivers/pwm/pwm-tiehrpwm.c index af231fa74fa9..9848493dee97 100644 --- a/drivers/pwm/pwm-tiehrpwm.c +++ b/drivers/pwm/pwm-tiehrpwm.c @@ -347,7 +347,7 @@ static int ehrpwm_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm) ret = clk_enable(pc->tbclk); if (ret) { dev_err(chip->dev, "Failed to enable TBCLK for %s: %d\n", - dev_name(pc->chip.dev), ret); + dev_name(chip->dev), ret); return ret; } |