mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-01 02:33:57 +00:00
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>
This commit is contained in:
parent
e80c1aa6ae
commit
74836319c2
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user