iio: light sensor: Fix a panic in the tsl2563 driver.
authorBryan Freed <bfreed@chromium.org>
Tue, 21 Jun 2011 22:54:57 +0000 (15:54 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 28 Jun 2011 21:52:25 +0000 (14:52 -0700)
Add the required read/write_raw functions to the tsl2563_info_no_irq data
structure.  This structure is used insted of tsl2563_info when the I2C client
has no IRQ.
The absence of these functions causes a panic when reading or writing the
created sysfs files.

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

index c473412123820f23f29df17ac7b865e1dd202792..98ea6afc5cc85b8cd4df08e3e5998ed56cf751b5 100644 (file)
@@ -691,6 +691,8 @@ static struct i2c_driver tsl2563_i2c_driver;
 
 static const struct iio_info tsl2563_info_no_irq = {
        .driver_module = THIS_MODULE,
+       .read_raw = &tsl2563_read_raw,
+       .write_raw = &tsl2563_write_raw,
 };
 
 static const struct iio_info tsl2563_info = {