From: Dmitry Torokhov <dtor@insightbb.com>
To: linux-kernel@vger.kernel.org
Cc: rpurdie@rpsys.net, lenz@cs.wisc.edu, rmk@arm.linux.org.uk,
Pavel Machek <pavel@ucw.cz>
Subject: [PATCH] ucb1x00 - do not access input_dev->private directly
Date: Wed, 9 May 2007 00:40:58 -0400 [thread overview]
Message-ID: <200705090040.59124.dtor@insightbb.com> (raw)
Use input_get_drvdata() and input_set_drvdata() helpers to do that.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
---
... Not tested - no hardware ...
drivers/mfd/ucb1x00-ts.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
Index: work/drivers/mfd/ucb1x00-ts.c
===================================================================
--- work.orig/drivers/mfd/ucb1x00-ts.c
+++ work/drivers/mfd/ucb1x00-ts.c
@@ -300,7 +300,7 @@ static void ucb1x00_ts_irq(int idx, void
static int ucb1x00_ts_open(struct input_dev *idev)
{
- struct ucb1x00_ts *ts = idev->private;
+ struct ucb1x00_ts *ts = input_get_drvdata(idev);
int ret = 0;
BUG_ON(ts->rtask);
@@ -337,7 +337,7 @@ static int ucb1x00_ts_open(struct input_
*/
static void ucb1x00_ts_close(struct input_dev *idev)
{
- struct ucb1x00_ts *ts = idev->private;
+ struct ucb1x00_ts *ts = input_get_drvdata(idev);
if (ts->rtask)
kthread_stop(ts->rtask);
@@ -389,7 +389,6 @@ static int ucb1x00_ts_add(struct ucb1x00
ts->idev = idev;
ts->adcsync = adcsync ? UCB_SYNC : UCB_NOSYNC;
- idev->private = ts;
idev->name = "Touchscreen panel";
idev->id.product = ts->ucb->id;
idev->open = ucb1x00_ts_open;
@@ -400,6 +399,8 @@ static int ucb1x00_ts_add(struct ucb1x00
__set_bit(ABS_Y, idev->absbit);
__set_bit(ABS_PRESSURE, idev->absbit);
+ input_set_drvdata(idev, ts);
+
err = input_register_device(idev);
if (err)
goto fail;
reply other threads:[~2007-05-09 4:41 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=200705090040.59124.dtor@insightbb.com \
--to=dtor@insightbb.com \
--cc=lenz@cs.wisc.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=rmk@arm.linux.org.uk \
--cc=rpurdie@rpsys.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.