Commit bf2da970 authored by Vladimir Petrigo's avatar Vladimir Petrigo Committed by Jonathan Cameron

iio: adc: ad7780: Add parentheses to macros

- Fix CHECK Macro argument 'wordsize' may be better as '(wordsize)' to avoid precedence issues

Slightly modified by Jonathan to take into account the staging graduation
and a copy and paste version of the same item on the following line.
Signed-off-by: default avatarVladimir Petrigo <vladimir.petrigo@gmail.com>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 3cb51613
...@@ -206,9 +206,9 @@ static const struct ad_sigma_delta_info ad7780_sigma_delta_info = { ...@@ -206,9 +206,9 @@ static const struct ad_sigma_delta_info ad7780_sigma_delta_info = {
}; };
#define AD7780_CHANNEL(bits, wordsize) \ #define AD7780_CHANNEL(bits, wordsize) \
AD_SD_CHANNEL(1, 0, 0, bits, 32, wordsize - bits) AD_SD_CHANNEL(1, 0, 0, bits, 32, (wordsize) - (bits))
#define AD7170_CHANNEL(bits, wordsize) \ #define AD7170_CHANNEL(bits, wordsize) \
AD_SD_CHANNEL_NO_SAMP_FREQ(1, 0, 0, bits, 32, wordsize - bits) AD_SD_CHANNEL_NO_SAMP_FREQ(1, 0, 0, bits, 32, (wordsize) - (bits))
static const struct ad7780_chip_info ad7780_chip_info_tbl[] = { static const struct ad7780_chip_info ad7780_chip_info_tbl[] = {
[ID_AD7170] = { [ID_AD7170] = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment