mirror of
https://github.com/torvalds/linux.git
synced 2026-09-23 13:14:02 +02:00
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: 9a96084182 ("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>
This commit is contained in:
parent
d0f21621f8
commit
d64bfd9f33
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user