iio: Replace occurrences of magic number 0 by IIO_CHAN_INFO_RAW
Usually, functions responsible for reading raw data typically relies on values from iio_chan_info_enum to correctly identify the type of data to be read. There is a set of a device driver that uses the magic number 0 instead of IIO_CHAN_INFO_RAW. This patch improves the readability by replaces the magic number 0 for the appropriate IIO_CHAN_INFO_RAW in six devices driver in the IIO subsystem. Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:

committed by
Jonathan Cameron

parent
f22fb87d4c
commit
67464a54e5
@@ -158,7 +158,7 @@ static unsigned int ad5380_info_to_reg(struct iio_chan_spec const *chan,
|
||||
long info)
|
||||
{
|
||||
switch (info) {
|
||||
case 0:
|
||||
case IIO_CHAN_INFO_RAW:
|
||||
return AD5380_REG_DATA(chan->address);
|
||||
case IIO_CHAN_INFO_CALIBBIAS:
|
||||
return AD5380_REG_OFFSET(chan->address);
|
||||
|
Reference in New Issue
Block a user