Merge tag 'pwm/for-6.7-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 10 Nov 2023 19:34:16 +0000 (11:34 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 10 Nov 2023 19:34:16 +0000 (11:34 -0800)
Pull pwm fixes from Thierry Reding:
 "This contains two very small fixes that I failed to include in the
  main pull request"

* tag 'pwm/for-6.7-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm:
  pwm: Fix double shift bug
  pwm: samsung: Fix a bit test in pwm_samsung_resume()

drivers/pwm/pwm-samsung.c
include/linux/pwm.h

index 568491ed6829e96b71e6e53c5beefcbd49c814e5..69d9f4577b3479fd6038b7e71cc56cfff48fa7c2 100644 (file)
@@ -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))
index e3b437587b32d7d84d5f367d6643b3c1fa1ce702..cda3597b84f2c32fbe567c04b3c4114311bed02a 100644 (file)
@@ -41,8 +41,8 @@ struct pwm_args {
 };
 
 enum {
-       PWMF_REQUESTED = 1 << 0,
-       PWMF_EXPORTED = 1 << 1,
+       PWMF_REQUESTED = 0,
+       PWMF_EXPORTED = 1,
 };
 
 /*