diff options
| author | Nikhil Gautam <nikhilgtr@gmail.com> | 2026-07-14 17:01:34 +0530 |
|---|---|---|
| committer | Jonathan Cameron <jonathan.cameron@oss.qualcomm.com> | 2026-08-07 23:51:04 +0100 |
| commit | d64bfd9f3352b9d9bdeca06de1a0a1c1bd47b896 (patch) | |
| tree | 7c14dd4db636c7c8d1137d6148ae9d1693adfb3f | |
| parent | d0f21621f8b2b46661ea066d20705dbf7253db87 (diff) | |
| download | linux-stable-d64bfd9f3352b9d9bdeca06de1a0a1c1bd47b896.tar.gz linux-stable-d64bfd9f3352b9d9bdeca06de1a0a1c1bd47b896.zip | |
iio: light: opt4001: Fix reversed GENMASK() arguments in fault count mask
GENMASK(h, l) requires h >= l, but OPT4001_CTRL_FAULT_COUNT is defined
as GENMASK(0, 1). The define is currently unused so there is no
functional impact, but fix it before anyone builds on it, and add the
_MASK suffix for consistency with the neighbouring definitions.
Fixes: 9a9608418292 ("iio: light: Add support for TI OPT4001 light sensor")
Signed-off-by: Nikhil Gautam <nikhilgtr@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
| -rw-r--r-- | drivers/iio/light/opt4001.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/light/opt4001.c b/drivers/iio/light/opt4001.c index 2448d6330489..aa3d87995b7c 100644 --- a/drivers/iio/light/opt4001.c +++ b/drivers/iio/light/opt4001.c @@ -39,7 +39,7 @@ #define OPT4001_CTRL_OPER_MODE_MASK GENMASK(5, 4) #define OPT4001_CTRL_LATCH_MASK GENMASK(3, 3) #define OPT4001_CTRL_INT_POL_MASK GENMASK(2, 2) -#define OPT4001_CTRL_FAULT_COUNT GENMASK(0, 1) +#define OPT4001_CTRL_FAULT_COUNT_MASK GENMASK(1, 0) /* OPT4001 constants */ #define OPT4001_DEVICE_ID_VAL 0x121 |
