diff options
author | Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com> | 2018-02-27 11:47:55 -0300 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2018-03-03 15:23:13 +0000 |
commit | 5def839c481712f2f0a3a34755ee6b27279e7cbe (patch) | |
tree | fdd23c62211a51a2b40665a3fdc85f699389d936 /drivers/iio/magnetometer | |
parent | 5556dfe54be421b1b2897513adf61d9b6d3ab271 (diff) | |
download | linux-5def839c481712f2f0a3a34755ee6b27279e7cbe.tar.gz linux-5def839c481712f2f0a3a34755ee6b27279e7cbe.tar.bz2 linux-5def839c481712f2f0a3a34755ee6b27279e7cbe.zip |
iio:magnetometer: Replace magic number 0 by IIO_CHAN_INFO_RAW
The function magn_3d_read_raw has a switch statement handling multiple
cases per channel. The first case statement uses the magic number 0,
which means IIO_CHAN_INFO_RAW. Additionally, the iio_chan_spec for
magn_3d_channels is configured to be IIO_CHAN_INFO_RAW. Therefore, this
patch replaces the magic number 0 for the appropriate IIO_CHAN_INFO_RAW.
Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/magnetometer')
-rw-r--r-- | drivers/iio/magnetometer/hid-sensor-magn-3d.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/magnetometer/hid-sensor-magn-3d.c b/drivers/iio/magnetometer/hid-sensor-magn-3d.c index a1fd9d591818..d55c4885211a 100644 --- a/drivers/iio/magnetometer/hid-sensor-magn-3d.c +++ b/drivers/iio/magnetometer/hid-sensor-magn-3d.c @@ -167,7 +167,7 @@ static int magn_3d_read_raw(struct iio_dev *indio_dev, *val = 0; *val2 = 0; switch (mask) { - case 0: + case IIO_CHAN_INFO_RAW: hid_sensor_power_state(&magn_state->magn_flux_attributes, true); report_id = magn_state->magn[chan->address].report_id; |