Skip to content

Commit

Permalink
HID: Don't access input_dev->private directly
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dmitry Torokhov authored and Jiri Kosina committed Oct 31, 2007
1 parent 368d290 commit f202df6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/hid/hid-input.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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;

Expand Down

0 comments on commit f202df6

Please sign in to comment.