staging: iio: adc: ad7280a: Avoid precedence issues in macro
Enclosing parameter with parenthesis due to avoid possible precedence issue. Signed-off-by: Cristian Sicilia <sicilia.cristian@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
parent
10b5d3d107
commit
d04411c2a6
|
@ -97,9 +97,10 @@
|
|||
#define AD7280A_NUM_CH (AD7280A_AUX_ADC_6 - \
|
||||
AD7280A_CELL_VOLTAGE_1 + 1)
|
||||
|
||||
#define AD7280A_CALC_VOLTAGE_CHAN_NUM(d, c) ((d * AD7280A_CELLS_PER_DEV) + c)
|
||||
#define AD7280A_CALC_TEMP_CHAN_NUM(d, c) ((d * AD7280A_CELLS_PER_DEV) + \
|
||||
c - AD7280A_CELLS_PER_DEV)
|
||||
#define AD7280A_CALC_VOLTAGE_CHAN_NUM(d, c) (((d) * AD7280A_CELLS_PER_DEV) + \
|
||||
(c))
|
||||
#define AD7280A_CALC_TEMP_CHAN_NUM(d, c) (((d) * AD7280A_CELLS_PER_DEV) + \
|
||||
(c) - AD7280A_CELLS_PER_DEV)
|
||||
|
||||
#define AD7280A_DEVADDR_MASTER 0
|
||||
#define AD7280A_DEVADDR_ALL 0x1F
|
||||
|
|
Loading…
Reference in New Issue