]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
HID: Don't access input_dev->private directly
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 31 Oct 2007 11:33:26 +0000 (12:33 +0100)
committerJiri Kosina <jkosina@suse.cz>
Wed, 31 Oct 2007 12:30:35 +0000 (13:30 +0100)
input_{get|set}_drvdata() helpers should be used instead.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-input.c

index 71eb7693e453ffe90c9b07490220253bfc63251e..0b27da7d749700b4d0e2481b7c121ce9fa033aaa 100644 (file)
@@ -297,7 +297,7 @@ static struct hid_usage *hidinput_find_key(struct hid_device *hid,
 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 input_dev *dev, int scancode,
 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;