projects/linux·commit b077b7ee

Merge tag 'pwm/for-6.7-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm

b077b7ee · Linus Torvalds <[email protected]> · 2023-11-10 11:34:16 -08:00

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()
Commit
b077b7ee9268bb4a34e22a503a2e6315ae8f97a7
Parents
b712075e · d27abbfd

Merge commit. Changes below are compared with the first parent: b712075e.

Changes

2 files changed · +3 −3

FileStatusAddDelContent
drivers/pwm/pwm-samsung.cmodified+1−1View file
include/linux/pwm.hmodified+2−2View file

drivers/pwm/pwm-samsung.c

View file
diff --git a/drivers/pwm/pwm-samsung.c b/drivers/pwm/pwm-samsung.c
index 568491e..69d9f45 100644
--- a/drivers/pwm/pwm-samsung.c
+++ b/drivers/pwm/pwm-samsung.c
@@ -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))

include/linux/pwm.h

View file
diff --git a/include/linux/pwm.h b/include/linux/pwm.h
index e3b4375..cda3597 100644
--- a/include/linux/pwm.h
+++ b/include/linux/pwm.h
@@ -41,8 +41,8 @@ struct pwm_args {
};
enum {
- PWMF_REQUESTED = 1 << 0,
- PWMF_EXPORTED = 1 << 1,
+ PWMF_REQUESTED = 0,
+ PWMF_EXPORTED = 1,
};
/*