diff options
author | Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com> | 2018-03-06 13:02:57 +0100 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2018-03-07 21:14:36 +0100 |
commit | 67464a54e5156ed2e5a72ffb516308b58f25e6ca (patch) | |
tree | 10beddd82f154a8af3335d30848badbf103091aa /drivers/iio/light/lm3533-als.c | |
parent | staging:iio:meter: Aligns open parenthesis (diff) | |
download | linux-67464a54e5156ed2e5a72ffb516308b58f25e6ca.tar.xz linux-67464a54e5156ed2e5a72ffb516308b58f25e6ca.zip |
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>
Diffstat (limited to 'drivers/iio/light/lm3533-als.c')
-rw-r--r-- | drivers/iio/light/lm3533-als.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/light/lm3533-als.c b/drivers/iio/light/lm3533-als.c index 36208a3652e9..ff5a3324b489 100644 --- a/drivers/iio/light/lm3533-als.c +++ b/drivers/iio/light/lm3533-als.c @@ -199,7 +199,7 @@ static int lm3533_als_read_raw(struct iio_dev *indio_dev, int ret; switch (mask) { - case 0: + case IIO_CHAN_INFO_RAW: switch (chan->type) { case IIO_LIGHT: ret = lm3533_als_get_adc(indio_dev, false, val); |