diff options
author | Boris Brezillon <boris.brezillon@free-electrons.com> | 2016-04-14 15:17:22 -0400 |
---|---|---|
committer | Thierry Reding <thierry.reding@gmail.com> | 2016-05-17 08:44:59 -0400 |
commit | 4b58896f72176b781816a9e14dcea5f755b19b5c (patch) | |
tree | a66f0e8680513767108c2905e7ff46f7e8562fb0 /drivers/pwm/pwm-sun4i.c | |
parent | 459a25afe97cb3d7f978b90c881f4d7aac8fb755 (diff) |
pwm: Use pwm_get/set_xxx() helpers where appropriate
Use pwm_get/set_xxx() helpers instead of directly accessing the pwm->xxx
field. Doing that will ease adaptation of the PWM framework to support
atomic update.
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'drivers/pwm/pwm-sun4i.c')
-rw-r--r-- | drivers/pwm/pwm-sun4i.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/pwm/pwm-sun4i.c b/drivers/pwm/pwm-sun4i.c index 67af9f62361f..03a99a53c39e 100644 --- a/drivers/pwm/pwm-sun4i.c +++ b/drivers/pwm/pwm-sun4i.c | |||
@@ -354,7 +354,8 @@ static int sun4i_pwm_probe(struct platform_device *pdev) | |||
354 | val = sun4i_pwm_readl(pwm, PWM_CTRL_REG); | 354 | val = sun4i_pwm_readl(pwm, PWM_CTRL_REG); |
355 | for (i = 0; i < pwm->chip.npwm; i++) | 355 | for (i = 0; i < pwm->chip.npwm; i++) |
356 | if (!(val & BIT_CH(PWM_ACT_STATE, i))) | 356 | if (!(val & BIT_CH(PWM_ACT_STATE, i))) |
357 | pwm->chip.pwms[i].polarity = PWM_POLARITY_INVERSED; | 357 | pwm_set_polarity(&pwm->chip.pwms[i], |
358 | PWM_POLARITY_INVERSED); | ||
358 | clk_disable_unprepare(pwm->clk); | 359 | clk_disable_unprepare(pwm->clk); |
359 | 360 | ||
360 | return 0; | 361 | return 0; |