summaryrefslogtreecommitdiff
path: root/drivers/iio
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2019-07-09 22:04:17 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-08-16 10:13:45 +0200
commit9af22331765a05cf12d8a521641ca133111a68cc (patch)
treeef834852014341c6a35e309a445455148349aa35 /drivers/iio
parent3ffe1e79c174b2093f7ee3df589a7705572c9620 (diff)
iio: adc: max9611: Fix misuse of GENMASK macro
commit ae8cc91a7d85e018c0c267f580820b2bb558cd48 upstream. Arguments are supposed to be ordered high then low. Signed-off-by: Joe Perches <joe@perches.com> Fixes: 69780a3bbc0b ("iio: adc: Add Maxim max9611 ADC driver") Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/iio')
-rw-r--r--drivers/iio/adc/max9611.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/adc/max9611.c b/drivers/iio/adc/max9611.c
index b1dd17cbce58..f8f298c33b28 100644
--- a/drivers/iio/adc/max9611.c
+++ b/drivers/iio/adc/max9611.c
@@ -86,7 +86,7 @@
#define MAX9611_TEMP_MAX_POS 0x7f80
#define MAX9611_TEMP_MAX_NEG 0xff80
#define MAX9611_TEMP_MIN_NEG 0xd980
-#define MAX9611_TEMP_MASK GENMASK(7, 15)
+#define MAX9611_TEMP_MASK GENMASK(15, 7)
#define MAX9611_TEMP_SHIFT 0x07
#define MAX9611_TEMP_RAW(_r) ((_r) >> MAX9611_TEMP_SHIFT)
#define MAX9611_TEMP_SCALE_NUM 1000000