diff options
author | Dmitry Torokhov <dtor@insightbb.com> | 2007-05-09 04:17:31 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2007-05-09 04:17:31 -0400 |
commit | e071298589418076ef0a9813677f2d7032b65baa (patch) | |
tree | 1ec366c95456511dc0820aed22b333caf89e0a2d /drivers/hid/hid-input.c | |
parent | fed76ab3b206bd0c5a9e3be17cead0a22d7593c5 (diff) |
HID: switch to using input_dev->dev.parent
In preparation for struct class_device -> struct device input
core conversion switch to using input_dev->dev.parent when
specifying device position in sysfs tree.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-input.c')
-rw-r--r-- | drivers/hid/hid-input.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c index 52de9a914a82..a87b059f866f 100644 --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c | |||
@@ -244,7 +244,7 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel | |||
244 | struct hid_usage *usage) | 244 | struct hid_usage *usage) |
245 | { | 245 | { |
246 | struct input_dev *input = hidinput->input; | 246 | struct input_dev *input = hidinput->input; |
247 | struct hid_device *device = input->private; | 247 | struct hid_device *device = input_get_drvdata(input); |
248 | int max = 0, code; | 248 | int max = 0, code; |
249 | unsigned long *bit = NULL; | 249 | unsigned long *bit = NULL; |
250 | 250 | ||
@@ -859,13 +859,15 @@ EXPORT_SYMBOL_GPL(hidinput_find_field); | |||
859 | 859 | ||
860 | static int hidinput_open(struct input_dev *dev) | 860 | static int hidinput_open(struct input_dev *dev) |
861 | { | 861 | { |
862 | struct hid_device *hid = dev->private; | 862 | struct hid_device *hid = input_get_drvdata(dev); |
863 | |||
863 | return hid->hid_open(hid); | 864 | return hid->hid_open(hid); |
864 | } | 865 | } |
865 | 866 | ||
866 | static void hidinput_close(struct input_dev *dev) | 867 | static void hidinput_close(struct input_dev *dev) |
867 | { | 868 | { |
868 | struct hid_device *hid = dev->private; | 869 | struct hid_device *hid = input_get_drvdata(dev); |
870 | |||
869 | hid->hid_close(hid); | 871 | hid->hid_close(hid); |
870 | } | 872 | } |
871 | 873 | ||
@@ -913,7 +915,7 @@ int hidinput_connect(struct hid_device *hid) | |||
913 | return -1; | 915 | return -1; |
914 | } | 916 | } |
915 | 917 | ||
916 | input_dev->private = hid; | 918 | input_set_drvdata(input_dev, hid); |
917 | input_dev->event = hid->hidinput_input_event; | 919 | input_dev->event = hid->hidinput_input_event; |
918 | input_dev->open = hidinput_open; | 920 | input_dev->open = hidinput_open; |
919 | input_dev->close = hidinput_close; | 921 | input_dev->close = hidinput_close; |
@@ -925,7 +927,7 @@ int hidinput_connect(struct hid_device *hid) | |||
925 | input_dev->id.vendor = hid->vendor; | 927 | input_dev->id.vendor = hid->vendor; |
926 | input_dev->id.product = hid->product; | 928 | input_dev->id.product = hid->product; |
927 | input_dev->id.version = hid->version; | 929 | input_dev->id.version = hid->version; |
928 | input_dev->cdev.dev = hid->dev; | 930 | input_dev->dev.parent = hid->dev; |
929 | hidinput->input = input_dev; | 931 | hidinput->input = input_dev; |
930 | list_add_tail(&hidinput->list, &hid->inputs); | 932 | list_add_tail(&hidinput->list, &hid->inputs); |
931 | } | 933 | } |