From: Dmitry Torokhov Date: Wed, 31 Oct 2007 11:33:26 +0000 (+0100) Subject: HID: Don't access input_dev->private directly X-Git-Tag: v2.6.24-rc2~54^2 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f202df600c4485d406aa033ce793d3e78f5ff1e0;p=linux-2.6 HID: Don't access input_dev->private directly input_{get|set}_drvdata() helpers should be used instead. Signed-off-by: Dmitry Torokhov Signed-off-by: Jiri Kosina --- diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c index 71eb7693e4..0b27da7d74 100644 --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c @@ -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;