lkml.org 
[lkml]   [2011]   [Jun]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 3/3] light sensor: Fix a panic in the tsl2563 driver.
Date
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>
---
drivers/staging/iio/light/tsl2563.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/staging/iio/light/tsl2563.c b/drivers/staging/iio/light/tsl2563.c
index d9be19c..bca99f1 100644
--- a/drivers/staging/iio/light/tsl2563.c
+++ b/drivers/staging/iio/light/tsl2563.c
@@ -713,6 +713,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 = {
--
1.7.3.1


\
 
 \ /
  Last update: 2011-06-22 00:57    [W:0.088 / U:0.520 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site