diff options
author | Vladimir Petrigo <vladimir.petrigo@gmail.com> | 2019-03-22 00:15:28 +0300 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2019-04-04 20:20:30 +0100 |
commit | bf2da9707900299489ea74c48295e5c99c28b655 (patch) | |
tree | 87d2a778989a99f0d0f93226068fb17c5b11a76f /drivers | |
parent | 3cb5161317b2b7680a438910c53ba1d6befd221c (diff) | |
download | linux-bf2da9707900299489ea74c48295e5c99c28b655.tar.bz2 |
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: Vladimir Petrigo <vladimir.petrigo@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/iio/adc/ad7780.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/iio/adc/ad7780.c b/drivers/iio/adc/ad7780.c index 74c85bd566e5..217a5a5c3c6d 100644 --- a/drivers/iio/adc/ad7780.c +++ b/drivers/iio/adc/ad7780.c @@ -206,9 +206,9 @@ static const struct ad_sigma_delta_info ad7780_sigma_delta_info = { }; #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) \ - 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[] = { [ID_AD7170] = { |