iio: light sensor: Fix a panic in the tsl2563 driver.
authorBryan Freed <bfreed@chromium.org>
Tue, 21 Jun 2011 22:54:56 +0000 (15:54 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 28 Jun 2011 21:52:24 +0000 (14:52 -0700)
commit8f518d71f392b597832653f9438332ae27019da1
treebdb596f36e01cd099c2cd034d6597ca80265cd69
parentbeeada734f9c6a11dbc37790848a19f3582440fc
iio: light sensor: Fix a panic in the tsl2563 driver.

Add a wrapper for this driver around the IIO_CHAN() wrapper to make channel
parameters more readable.  This fixes a panic caused by the info_masks being
accidentally passed in as channel2 parameters which easily surpass the size
of the iio_modifier_names_light array.

Signed-off-by: Bryan Freed <bfreed@chromium.org>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/iio/light/tsl2563.c