summaryrefslogtreecommitdiff
path: root/drivers/iio/adc
diff options
context:
space:
mode:
authorMd Shofiqul Islam <shofiqtest@gmail.com>2026-05-09 18:19:57 +0300
committerJonathan Cameron <jic23@kernel.org>2026-05-31 10:59:38 +0100
commit5d7b3df5c1be8f46c2d3eabd1c1fd7b27294cbd3 (patch)
treeaba5a27761292e392897a7436670c4f8390cf4ef /drivers/iio/adc
parentd0f23d8a9091f43329e79bcd29bcac6bf81205e5 (diff)
downloadlinux-next-5d7b3df5c1be8f46c2d3eabd1c1fd7b27294cbd3.tar.gz
linux-next-5d7b3df5c1be8f46c2d3eabd1c1fd7b27294cbd3.zip
iio: adc: ti-ads1298: Add parentheses around macro parameter
ADS1298_REG_CHnSET() is missing parentheses around the parameter 'n'. Add them to follow kernel macro coding style and prevent potential operator precedence issues if the argument is an expression. Signed-off-by: Md Shofiqul Islam <shofiqtest@gmail.com> Reviewed-by: Stepan Ionichev <sozdayvek@gmail.com> Acked-by: Mike Looijmans <mike.looijmans@topic.nl> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/adc')
-rw-r--r--drivers/iio/adc/ti-ads1298.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/adc/ti-ads1298.c b/drivers/iio/adc/ti-ads1298.c
index 25261163d3e2..69911b0cde84 100644
--- a/drivers/iio/adc/ti-ads1298.c
+++ b/drivers/iio/adc/ti-ads1298.c
@@ -66,7 +66,7 @@
#define ADS1298_MASK_CONFIG3_VREF_4V BIT(5)
#define ADS1298_REG_LOFF 0x04
-#define ADS1298_REG_CHnSET(n) (0x05 + n)
+#define ADS1298_REG_CHnSET(n) (0x05 + (n))
#define ADS1298_MASK_CH_PD BIT(7)
#define ADS1298_MASK_CH_PGA GENMASK(6, 4)
#define ADS1298_MASK_CH_MUX GENMASK(2, 0)