All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] HID: Don't access input_dev->private directly
@ 2007-10-31  0:50 Dmitry Torokhov
  2007-10-31 11:15 ` Jiri Kosina
  0 siblings, 1 reply; 2+ messages in thread
From: Dmitry Torokhov @ 2007-10-31  0:50 UTC (permalink / raw)
  To: Jiri Kosina, linux-input, linux-input

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;
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-10-31 11:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-31  0:50 [PATCH] HID: Don't access input_dev->private directly Dmitry Torokhov
2007-10-31 11:15 ` Jiri Kosina

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.