Commit 74836319 authored by Uwe Kleine-König's avatar Uwe Kleine-König

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.deSigned-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
parent e80c1aa6
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment