aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pwm/pwm-lpc18xx-sct.c
diff options
context:
space:
mode:
authorBoris Brezillon <boris.brezillon@free-electrons.com>2016-04-14 15:17:22 -0400
committerThierry Reding <thierry.reding@gmail.com>2016-05-17 08:44:59 -0400
commit4b58896f72176b781816a9e14dcea5f755b19b5c (patch)
treea66f0e8680513767108c2905e7ff46f7e8562fb0 /drivers/pwm/pwm-lpc18xx-sct.c
parent459a25afe97cb3d7f978b90c881f4d7aac8fb755 (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-lpc18xx-sct.c')
-rw-r--r--drivers/pwm/pwm-lpc18xx-sct.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pwm/pwm-lpc18xx-sct.c b/drivers/pwm/pwm-lpc18xx-sct.c
index 9861fed4e67d..19dc64cab2f0 100644
--- a/drivers/pwm/pwm-lpc18xx-sct.c
+++ b/drivers/pwm/pwm-lpc18xx-sct.c
@@ -249,7 +249,7 @@ static int lpc18xx_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm)
249 LPC18XX_PWM_EVSTATEMSK(lpc18xx_data->duty_event), 249 LPC18XX_PWM_EVSTATEMSK(lpc18xx_data->duty_event),
250 LPC18XX_PWM_EVSTATEMSK_ALL); 250 LPC18XX_PWM_EVSTATEMSK_ALL);
251 251
252 if (pwm->polarity == PWM_POLARITY_NORMAL) { 252 if (pwm_get_polarity(pwm) == PWM_POLARITY_NORMAL) {
253 set_event = lpc18xx_pwm->period_event; 253 set_event = lpc18xx_pwm->period_event;
254 clear_event = lpc18xx_data->duty_event; 254 clear_event = lpc18xx_data->duty_event;
255 res_action = LPC18XX_PWM_RES_SET; 255 res_action = LPC18XX_PWM_RES_SET;