diff options
author | Boris Brezillon <boris.brezillon@free-electrons.com> | 2016-06-22 10:25:14 +0300 |
---|---|---|
committer | Thierry Reding <thierry.reding@gmail.com> | 2016-06-23 19:37:05 +0300 |
commit | 33cdcee04be3b4482be97393167e7561b2584e1e (patch) | |
tree | 4aa9751b50c199d016d111abbe4bc011f060effa /include/asm-generic/qspinlock.h | |
parent | cc51846ba81ca179a3be20f6313e3b72531888c1 (diff) | |
download | linux-33cdcee04be3b4482be97393167e7561b2584e1e.tar.xz |
pwm: Fix pwm_apply_args()
Commit 5ec803edcb70 ("pwm: Add core infrastructure to allow atomic
updates"), implemented pwm_disable() as a wrapper around
pwm_apply_state(), and then, commit ef2bf4997f7d ("pwm: Improve args
checking in pwm_apply_state()") added missing checks on the ->period
value in pwm_apply_state() to ensure we were not passing inappropriate
values to the ->config() or ->apply() methods.
The conjunction of these 2 commits led to a case where pwm_disable()
was no longer succeeding, thus preventing the polarity setting done
in pwm_apply_args().
Set a valid period in pwm_apply_args() to ensure polarity setting
won't be rejected.
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Suggested-by: Brian Norris <briannorris@chromium.org>
Fixes: 5ec803edcb70 ("pwm: Add core infrastructure to allow atomic updates")
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Brian Norris <briannorris@chromium.org>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'include/asm-generic/qspinlock.h')
0 files changed, 0 insertions, 0 deletions