Skip to content

Commit

Permalink
pwm: samsung: Fix a bit test in pwm_samsung_resume()
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Uwe Kleine-König <[email protected]>
Reviewed-by: Sam Protsenko <[email protected]>
Signed-off-by: Thierry Reding <[email protected]>
  • Loading branch information
Dan Carpenter authored and thierryreding committed Nov 10, 2023
1 parent 4059206 commit a2da597
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/pwm/pwm-samsung.c
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ static int pwm_samsung_resume(struct device *dev)
struct pwm_device *pwm = &chip->pwms[i];
struct samsung_pwm_channel *chan = &our_chip->channel[i];

if (!(pwm->flags & PWMF_REQUESTED))
if (!test_bit(PWMF_REQUESTED, &pwm->flags))
continue;

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

0 comments on commit a2da597

Please sign in to comment.