diff options
author | Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> | 2017-04-24 06:01:07 -0400 |
---|---|---|
committer | Thierry Reding <thierry.reding@gmail.com> | 2017-08-21 04:39:11 -0400 |
commit | 23aa19a22e7fcb49ebe198517d0a15b46810243f (patch) | |
tree | d09a22b062d62e11deadbe009804eb8c79ca91ed | |
parent | 8bdb65dc8575978214785462870852a56b6a21ac (diff) |
pwm: samsung: Remove redundant checks from pwm_samsung_config()
If the requested period_ns and duty_ns values are identical to the last
programmed ones pwm_samsung_config() returns early and skips the
hardware configuration. The same checks are now done by the PWM core so
the driver specific ones can be removed.
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
-rw-r--r-- | drivers/pwm/pwm-samsung.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/pwm/pwm-samsung.c b/drivers/pwm/pwm-samsung.c index f113cda47032..9ea7638228c8 100644 --- a/drivers/pwm/pwm-samsung.c +++ b/drivers/pwm/pwm-samsung.c | |||
@@ -312,9 +312,6 @@ static int pwm_samsung_config(struct pwm_chip *chip, struct pwm_device *pwm, | |||
312 | if (period_ns > NSEC_PER_SEC) | 312 | if (period_ns > NSEC_PER_SEC) |
313 | return -ERANGE; | 313 | return -ERANGE; |
314 | 314 | ||
315 | if (period_ns == chan->period_ns && duty_ns == chan->duty_ns) | ||
316 | return 0; | ||
317 | |||
318 | tcnt = readl(our_chip->base + REG_TCNTB(pwm->hwpwm)); | 315 | tcnt = readl(our_chip->base + REG_TCNTB(pwm->hwpwm)); |
319 | oldtcmp = readl(our_chip->base + REG_TCMPB(pwm->hwpwm)); | 316 | oldtcmp = readl(our_chip->base + REG_TCMPB(pwm->hwpwm)); |
320 | 317 | ||