From: Dmitry Torokhov <dtor@insightbb.com>
To: Jiri Kosina <jikos@jikos.cz>,
linux-input@atrey.karlin.mff.cuni.cz,
linux-input@vger.kernel.org
Subject: [PATCH] HID: Don't access input_dev->private directly
Date: Tue, 30 Oct 2007 20:50:03 -0400 [thread overview]
Message-ID: <200710302050.03864.dtor@insightbb.com> (raw)
Hi Jiri,
I'd like for the patch below to go to Linus rather sooner than
later because I want to commit patch removing input_dev->private...
..Or I could push it through my tree if you give me your Acked-by.
--
Dmitry
Subject: HID: Don't access input_dev->private directly
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
input_{get|set}_drvdata() helpers should be used instead.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
---
drivers/hid/hid-input.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Index: linux/drivers/hid/hid-input.c
===================================================================
--- linux.orig/drivers/hid/hid-input.c
+++ linux/drivers/hid/hid-input.c
@@ -297,7 +297,7 @@ static struct hid_usage *hidinput_find_k
static int hidinput_getkeycode(struct input_dev *dev, int scancode,
int *keycode)
{
- struct hid_device *hid = dev->private;
+ struct hid_device *hid = input_get_drvdata(dev);
struct hid_usage *usage;
usage = hidinput_find_key(hid, scancode, 0);
@@ -311,7 +311,7 @@ static int hidinput_getkeycode(struct in
static int hidinput_setkeycode(struct input_dev *dev, int scancode,
int keycode)
{
- struct hid_device *hid = dev->private;
+ struct hid_device *hid = input_get_drvdata(dev);
struct hid_usage *usage;
int old_keycode;
next reply other threads:[~2007-10-31 0:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-31 0:50 Dmitry Torokhov [this message]
2007-10-31 11:15 ` [PATCH] HID: Don't access input_dev->private directly Jiri Kosina
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=200710302050.03864.dtor@insightbb.com \
--to=dtor@insightbb.com \
--cc=jikos@jikos.cz \
--cc=linux-input@atrey.karlin.mff.cuni.cz \
--cc=linux-input@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 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.