Skip to content

Commit

Permalink
iio: light sensor: Fix a panic in the tsl2563 driver.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Bryan Freed authored and Greg Kroah-Hartman committed Jun 28, 2011
1 parent 8f518d7 commit 9e4216f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/staging/iio/light/tsl2563.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit 9e4216f

Please sign in to comment.