mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bryan Freed <bfreed@chromium.org>
To: linux-kernel@vger.kernel.org
Cc: jic23@cam.ac.uk, jbrenner@taosinc.com, gregkh@suse.de,
	arnd@arndb.de, Bryan Freed <bfreed@chromium.org>
Subject: [PATCH 3/3] light sensor: Fix a panic in the tsl2563 driver.
Date: Tue, 21 Jun 2011 15:54:57 -0700	[thread overview]
Message-ID: <1308696897-25161-3-git-send-email-bfreed@chromium.org> (raw)
In-Reply-To: <1308696897-25161-1-git-send-email-bfreed@chromium.org>

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


  parent reply	other threads:[~2011-06-21 22:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-21 22:54 [PATCH 1/3] light sensor: Add SMBUS support to " Bryan Freed
2011-06-21 22:54 ` [PATCH 2/3] light sensor: Fix a panic in " Bryan Freed
2011-06-22  9:07   ` Jonathan Cameron
2011-06-21 22:54 ` Bryan Freed [this message]
2011-06-22  9:09   ` [PATCH 3/3] " Jonathan Cameron
2011-06-22  9:05 ` [PATCH 1/3] light sensor: Add SMBUS support to " Jonathan Cameron
2011-06-22 14:10   ` Jean Delvare
2011-06-22 15:53     ` Jonathan Cameron
2011-06-22 16:16       ` Jean Delvare

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1308696897-25161-3-git-send-email-bfreed@chromium.org \
    --to=bfreed@chromium.org \
    --cc=arnd@arndb.de \
    --cc=gregkh@suse.de \
    --cc=jbrenner@taosinc.com \
    --cc=jic23@cam.ac.uk \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®