staging: iio: tsl2x7x: use IIO_CONST_ATTR for calibscale_available
authorBrian Masney <masneyb@onstation.org>
Fri, 4 May 2018 02:53:13 +0000 (22:53 -0400)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 6 May 2018 18:06:46 +0000 (19:06 +0100)
commit11031d7df0696e42fce94ec391f5984678a7319f
tree295e58cee544a6b89d4b2c6ff432fbd085b63405
parent7775e1d1e74557e2b02a11fce4e0fa74f36f51f4
staging: iio: tsl2x7x: use IIO_CONST_ATTR for calibscale_available

The in_intensity0_calibscale_available sysfs attribute has code that
checks the device type to determine which calibration scales are
available. This check is not necessary since all of the supported
ALS device types use the scales 1 8 16 120. This patch converts the
sysfs attribute to use IIO_CONST_ATTR. The following device datasheets
were checked: tsl2571, tsl2771, tmd2771, tsl2572, tsl2772, tmd2772.

Signed-off-by: Brian Masney <masneyb@onstation.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/staging/iio/light/tsl2x7x.c