diff options
author | Boris Brezillon <boris.brezillon@free-electrons.com> | 2015-07-01 10:21:50 +0200 |
---|---|---|
committer | Thierry Reding <thierry.reding@gmail.com> | 2015-07-20 09:53:22 +0200 |
commit | 15da7b5001e498fa7dc619d4d7951f9665b071e4 (patch) | |
tree | b6326e565d42eed52a157f84440475f84760e958 /drivers/pwm/pwm-atmel.c | |
parent | pwm: Add pwm_get_polarity() helper function (diff) | |
download | linux-15da7b5001e498fa7dc619d4d7951f9665b071e4.tar.xz linux-15da7b5001e498fa7dc619d4d7951f9665b071e4.zip |
pwm: Make use of pwm_get_xxx() helpers where appropriate
Use the pwm_get_xxx() helpers instead of directly accessing the fields
in struct pwm_device. This will allow us to smoothly move to the atomic
update approach.
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-atmel.c')
-rw-r--r-- | drivers/pwm/pwm-atmel.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pwm/pwm-atmel.c b/drivers/pwm/pwm-atmel.c index b3b294de88e0..0e4bd4e8e582 100644 --- a/drivers/pwm/pwm-atmel.c +++ b/drivers/pwm/pwm-atmel.c @@ -114,7 +114,7 @@ static int atmel_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, u32 val; int ret; - if (pwm_is_enabled(pwm) && (period_ns != pwm->period)) { + if (pwm_is_enabled(pwm) && (period_ns != pwm_get_period(pwm))) { dev_err(chip->dev, "cannot change PWM period while enabled\n"); return -EBUSY; } |