diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-06-20 11:25:44 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-06-20 11:25:44 -0400 |
commit | af52739b922f656eb1f39016fabaabe4baeda2e2 (patch) | |
tree | 79a7aa810d0493cd0cf4adebac26d37f12e8b545 /drivers/pwm | |
parent | 25ed6a5e97809129a1bc852b6b5c7d03baa112c4 (diff) | |
parent | 33688abb2802ff3a230bd2441f765477b94cc89e (diff) |
Merge 4.7-rc4 into staging-next
We want the fixes in here, and we can resolve a merge issue in
drivers/iio/industrialio-trigger.c
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/pwm')
-rw-r--r-- | drivers/pwm/core.c | 3 | ||||
-rw-r--r-- | drivers/pwm/pwm-atmel-hlcdc.c | 2 | ||||
-rw-r--r-- | drivers/pwm/sysfs.c | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c index dba3843c53b8..ed337a8c34ab 100644 --- a/drivers/pwm/core.c +++ b/drivers/pwm/core.c | |||
@@ -457,7 +457,8 @@ int pwm_apply_state(struct pwm_device *pwm, struct pwm_state *state) | |||
457 | { | 457 | { |
458 | int err; | 458 | int err; |
459 | 459 | ||
460 | if (!pwm) | 460 | if (!pwm || !state || !state->period || |
461 | state->duty_cycle > state->period) | ||
461 | return -EINVAL; | 462 | return -EINVAL; |
462 | 463 | ||
463 | if (!memcmp(state, &pwm->state, sizeof(*state))) | 464 | if (!memcmp(state, &pwm->state, sizeof(*state))) |
diff --git a/drivers/pwm/pwm-atmel-hlcdc.c b/drivers/pwm/pwm-atmel-hlcdc.c index f994c7eaf41c..14fc011faa32 100644 --- a/drivers/pwm/pwm-atmel-hlcdc.c +++ b/drivers/pwm/pwm-atmel-hlcdc.c | |||
@@ -272,7 +272,7 @@ static int atmel_hlcdc_pwm_probe(struct platform_device *pdev) | |||
272 | chip->chip.of_pwm_n_cells = 3; | 272 | chip->chip.of_pwm_n_cells = 3; |
273 | chip->chip.can_sleep = 1; | 273 | chip->chip.can_sleep = 1; |
274 | 274 | ||
275 | ret = pwmchip_add(&chip->chip); | 275 | ret = pwmchip_add_with_polarity(&chip->chip, PWM_POLARITY_INVERSED); |
276 | if (ret) { | 276 | if (ret) { |
277 | clk_disable_unprepare(hlcdc->periph_clk); | 277 | clk_disable_unprepare(hlcdc->periph_clk); |
278 | return ret; | 278 | return ret; |
diff --git a/drivers/pwm/sysfs.c b/drivers/pwm/sysfs.c index d98599249a05..01695d48dd54 100644 --- a/drivers/pwm/sysfs.c +++ b/drivers/pwm/sysfs.c | |||
@@ -152,7 +152,7 @@ static ssize_t enable_store(struct device *child, | |||
152 | goto unlock; | 152 | goto unlock; |
153 | } | 153 | } |
154 | 154 | ||
155 | pwm_apply_state(pwm, &state); | 155 | ret = pwm_apply_state(pwm, &state); |
156 | 156 | ||
157 | unlock: | 157 | unlock: |
158 | mutex_unlock(&export->lock); | 158 | mutex_unlock(&export->lock); |