diff mbox series

[v1,079/101] pwm: lpc18xx-sct: Make use of parent device pointer in driver data

Message ID 20230808171931.944154-80-u.kleine-koenig@pengutronix.de
State Superseded
Headers show
Series pwm: Fix lifetime issues for pwm_chips | expand

Commit Message

Uwe Kleine-König Aug. 8, 2023, 5:19 p.m. UTC
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-lpc18xx-sct.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series


diff --git a/drivers/pwm/pwm-lpc18xx-sct.c b/drivers/pwm/pwm-lpc18xx-sct.c
index 49eabd9c1e36..cb7e230b1b36 100644
--- a/drivers/pwm/pwm-lpc18xx-sct.c
+++ b/drivers/pwm/pwm-lpc18xx-sct.c
@@ -197,7 +197,7 @@  static int lpc18xx_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,
 	if (period_ns < lpc18xx_pwm->min_period_ns ||
 	    period_ns > lpc18xx_pwm->max_period_ns) {
-		dev_err(chip->dev, "period %d not in range\n", period_ns);
+		dev_err(lpc18xx_pwm->dev, "period %d not in range\n", period_ns);
 		return -ERANGE;
@@ -213,7 +213,7 @@  static int lpc18xx_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,
 	if (requested_events > 2 && lpc18xx_pwm->period_ns != period_ns &&
 	    lpc18xx_pwm->period_ns) {
-		dev_err(chip->dev, "conflicting period requested for PWM %u\n",
+		dev_err(lpc18xx_pwm->dev, "conflicting period requested for PWM %u\n",
 		return -EBUSY;