Skip to content

Commit a2da597

Browse files
Dan Carpenterthierryreding
authored andcommitted
pwm: samsung: Fix a bit test in pwm_samsung_resume()
The PWMF_REQUESTED enum is supposed to be used with test_bit() and not used as in a bitwise AND. In this specific code the flag will never be set so the function is effectively a no-op. Fixes: e3fe982 ("pwm: samsung: Put per-channel data into driver data") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
1 parent 4059206 commit a2da597

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/pwm/pwm-samsung.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,7 @@ static int pwm_samsung_resume(struct device *dev)
631631
struct pwm_device *pwm = &chip->pwms[i];
632632
struct samsung_pwm_channel *chan = &our_chip->channel[i];
633633

634-
if (!(pwm->flags & PWMF_REQUESTED))
634+
if (!test_bit(PWMF_REQUESTED, &pwm->flags))
635635
continue;
636636

637637
if (our_chip->variant.output_mask & BIT(i))

0 commit comments

Comments
 (0)