diff --git a/drivers/pwm/pwm-sifive.c b/drivers/pwm/pwm-sifive.c index 1f8a50143300..0de02da98484 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(chip->dev, "Enable clk failed\n"); + dev_err(ddata->parent, "Enable clk failed\n"); return ret; } }
struct pwm_chip::dev is about to change. To not have to touch this driver in the same commit as struct pwm_chip::dev, make use of the already existing pointer to the parent device in driver data. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> --- drivers/pwm/pwm-sifive.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)