summaryrefslogtreecommitdiffstats
path: root/drivers/pwm/pwm-fsl-ftm.c
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2024-02-14 10:31:25 +0100
committerUwe Kleine-König <u.kleine-koenig@pengutronix.de>2024-02-19 11:04:08 +0100
commit74836319c24a12138c466f0be3da89adafc3779a (patch)
tree051535f4b56a41455ce8d5383ebbc7fb1b6d1dcb /drivers/pwm/pwm-fsl-ftm.c
parentpwm: fsl-ftm: Change prototype of a helper to prepare further changes (diff)
downloadlinux-74836319c24a12138c466f0be3da89adafc3779a.tar.xz
linux-74836319c24a12138c466f0be3da89adafc3779a.zip
pwm: fsl-ftm: Make use of pwmchip_parent() accessor
struct pwm_chip::dev is about to change. To not have to touch this driver in the same commit as struct pwm_chip::dev, use the accessor function provided for exactly this purpose. Link: https://lore.kernel.org/r/131f976a8f876a88e2a940f5acf6aa1d81833b89.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-fsl-ftm.c')
-rw-r--r--drivers/pwm/pwm-fsl-ftm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pwm/pwm-fsl-ftm.c b/drivers/pwm/pwm-fsl-ftm.c
index 5792c6ca449f..47f1f5ac39cf 100644
--- a/drivers/pwm/pwm-fsl-ftm.c
+++ b/drivers/pwm/pwm-fsl-ftm.c
@@ -233,7 +233,7 @@ static int fsl_pwm_apply_config(struct pwm_chip *chip,
bool do_write_period = false;
if (!fsl_pwm_calculate_period(fpc, newstate->period, &periodcfg)) {
- dev_err(chip->dev, "failed to calculate new period\n");
+ dev_err(pwmchip_parent(chip), "failed to calculate new period\n");
return -EINVAL;
}
@@ -247,7 +247,7 @@ static int fsl_pwm_apply_config(struct pwm_chip *chip,
*/
else if (!fsl_pwm_periodcfg_are_equal(&fpc->period, &periodcfg)) {
if (fsl_pwm_is_other_pwm_enabled(fpc, pwm)) {
- dev_err(chip->dev,
+ dev_err(pwmchip_parent(chip),
"Cannot change period for PWM %u, disable other PWMs first\n",
pwm->hwpwm);
return -EBUSY;