staging: iio: tsl2583: move from a global to a per device lux table
authorBrian Masney <masneyb@onstation.org>
Sat, 12 Nov 2016 18:19:34 +0000 (13:19 -0500)
committerJonathan Cameron <jic23@kernel.org>
Sun, 13 Nov 2016 13:07:29 +0000 (13:07 +0000)
commit0b6b361e161db7e56a5f06300dabfb325060f269
tree14df5bfa9e4eb6cc8b04a22d3f3c70114920817f
parent8386dd50a7d22bf42a412cfd7b1d24b08c1065ea
staging: iio: tsl2583: move from a global to a per device lux table

The driver contains a global lux table that can be updated via sysfs.
Change this to a per device lux table so that multiple devices can be
hooked up to the same system with different lux tables.

There are 10 entries, plus 1 for the termination segment, set aside for
the entries in the lux table. When updating the lux table via sysfs,
only 9 entries, plus the terminator, could be added. This changes
the code to allow for the 10 entries, plus the terminator.

Signed-off-by: Brian Masney <masneyb@onstation.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/staging/iio/light/tsl2583.c