diff options
author | Jonathan Cameron <jic23@cam.ac.uk> | 2011-10-26 17:41:36 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-11-26 16:35:04 -0800 |
commit | c8a9f8056f40f6201b84fdddb49a1c62630902c5 (patch) | |
tree | ec883343656925d7f0e88decf16689c4f47b8822 /drivers/staging/iio/light/tsl2563.c | |
parent | 924f8a21dd13223cc1493a916c6769cf73e0d45e (diff) |
staging:iio:treewide only use shared to decide on interfaces
Internally the fact that say scale is shared across channels is
actually of remarkably little interest. Hence lets not store it.
Numerous devices have weird combinations of channels sharing
scale anyway so it is not as though this was really telling
us much. Note however that we do still use the shared sysfs
attrs thus massively reducing the number of attrs in complex
drivers.
Side effect is that certain drivers that were abusing this
(mostly my work) needed to do a few more checks on what the
channel they are being queried on actually is.
This is also helpful for in kernel interfaces where we
just want to query the scale and don't care whether it
is shared with other channels or not.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/iio/light/tsl2563.c')
-rw-r--r-- | drivers/staging/iio/light/tsl2563.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/iio/light/tsl2563.c b/drivers/staging/iio/light/tsl2563.c index 45d04a1b1940..9199ea62aef6 100644 --- a/drivers/staging/iio/light/tsl2563.c +++ b/drivers/staging/iio/light/tsl2563.c @@ -513,7 +513,7 @@ static int tsl2563_read_raw(struct iio_dev *indio_dev, } break; - case IIO_CHAN_INFO_CALIBSCALE_SEPARATE: + case IIO_CHAN_INFO_CALIBSCALE: if (chan->channel == 0) *val = calib_to_sysfs(chip->calib0); else @@ -539,7 +539,7 @@ static const struct iio_chan_spec tsl2563_channels[] = { .type = IIO_INTENSITY, .modified = 1, .channel2 = IIO_MOD_LIGHT_BOTH, - .info_mask = (1 << IIO_CHAN_INFO_CALIBSCALE_SEPARATE), + .info_mask = IIO_CHAN_INFO_CALIBSCALE_SEPARATE_BIT, .event_mask = (IIO_EV_BIT(IIO_EV_TYPE_THRESH, IIO_EV_DIR_RISING) | IIO_EV_BIT(IIO_EV_TYPE_THRESH, @@ -548,7 +548,7 @@ static const struct iio_chan_spec tsl2563_channels[] = { .type = IIO_INTENSITY, .modified = 1, .channel2 = IIO_MOD_LIGHT_IR, - .info_mask = (1 << IIO_CHAN_INFO_CALIBSCALE_SEPARATE), + .info_mask = IIO_CHAN_INFO_CALIBSCALE_SEPARATE_BIT, } }; |