summaryrefslogtreecommitdiff
path: root/drivers/pwm/core.c
diff options
context:
space:
mode:
authorBoris Brezillon <boris.brezillon@free-electrons.com>2016-04-14 21:17:43 +0200
committerThierry Reding <thierry.reding@gmail.com>2016-05-17 14:48:04 +0200
commit39100ceea79ff2efeb2fb094baf120c73d5ccf47 (patch)
tree514b770fcf46d7bc675abc44c947fc1e79ba42ea /drivers/pwm/core.c
parenta07136fdcf12281781142caf1f78c6696721accd (diff)
pwm: Switch to the atomic API
Replace legacy pwm_get/set_xxx() and pwm_config/enable/disable() calls by pwm_get/apply_state(). Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'drivers/pwm/core.c')
-rw-r--r--drivers/pwm/core.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c
index 729d457861fd..b0b87b3b52a6 100644
--- a/drivers/pwm/core.c
+++ b/drivers/pwm/core.c
@@ -948,13 +948,16 @@ static void pwm_dbg_show(struct pwm_chip *chip, struct seq_file *s)
for (i = 0; i < chip->npwm; i++) {
struct pwm_device *pwm = &chip->pwms[i];
+ struct pwm_state state;
+
+ pwm_get_state(pwm, &state);
seq_printf(s, " pwm-%-3d (%-20.20s):", i, pwm->label);
if (test_bit(PWMF_REQUESTED, &pwm->flags))
seq_puts(s, " requested");
- if (pwm_is_enabled(pwm))
+ if (state.enabled)
seq_puts(s, " enabled");
seq_puts(s, "\n");