diff options
author | Jiri Kosina <jkosina@suse.cz> | 2007-01-24 05:54:19 -0500 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2007-02-05 04:00:40 -0500 |
commit | 7c379146005d277982acde02da44c773de5e7e5a (patch) | |
tree | 8a1bbbdabd357f11ec84e5e793539863139ffa71 /drivers/hid/hid-input.c | |
parent | c080d89ad91e98fec0e8fc5f448a1ad899bd85c7 (diff) |
HID: API - fix leftovers of hidinput API in USB HID
hidinput_{open,close}() functions do not belong to usbhid, but
to the generic HID layer. Move them, and fix hooks in struct
hid_device, so that now the callbacks are done to transport-specific
_open() functions, but not input_open() functions.
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-input.c')
-rw-r--r-- | drivers/hid/hid-input.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c index ae298c4bfcb..4824b19b864 100644 --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c | |||
@@ -805,6 +805,18 @@ int hidinput_find_field(struct hid_device *hid, unsigned int type, unsigned int | |||
805 | } | 805 | } |
806 | EXPORT_SYMBOL_GPL(hidinput_find_field); | 806 | EXPORT_SYMBOL_GPL(hidinput_find_field); |
807 | 807 | ||
808 | static int hidinput_open(struct input_dev *dev) | ||
809 | { | ||
810 | struct hid_device *hid = dev->private; | ||
811 | return hid->hid_open(hid); | ||
812 | } | ||
813 | |||
814 | static void hidinput_close(struct input_dev *dev) | ||
815 | { | ||
816 | struct hid_device *hid = dev->private; | ||
817 | hid->hid_close(hid); | ||
818 | } | ||
819 | |||
808 | /* | 820 | /* |
809 | * Register the input device; print a message. | 821 | * Register the input device; print a message. |
810 | * Configure the input layer interface | 822 | * Configure the input layer interface |
@@ -851,8 +863,8 @@ int hidinput_connect(struct hid_device *hid) | |||
851 | 863 | ||
852 | input_dev->private = hid; | 864 | input_dev->private = hid; |
853 | input_dev->event = hid->hidinput_input_event; | 865 | input_dev->event = hid->hidinput_input_event; |
854 | input_dev->open = hid->hidinput_open; | 866 | input_dev->open = hidinput_open; |
855 | input_dev->close = hid->hidinput_close; | 867 | input_dev->close = hidinput_close; |
856 | 868 | ||
857 | input_dev->name = hid->name; | 869 | input_dev->name = hid->name; |
858 | input_dev->phys = hid->phys; | 870 | input_dev->phys = hid->phys; |