diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-22 10:51:28 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-22 10:51:28 -0400 |
commit | 50223e486cabdcf7e540e519da1f26bab3084e5d (patch) | |
tree | c5eedda167c7ea83e342f80a9344646c7a99ba35 /drivers/hid/usbhid | |
parent | e258b80e691f1f3ae83a60aa80eaf7322bd55ec4 (diff) | |
parent | a2d693cf650f000ea22351484ee66cf4c2651eef (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
HID: Remove duplicate Kconfig entry
HID: consolidate connect and disconnect into core code
HID: fix non-atomic allocation in hid_input_report
Diffstat (limited to 'drivers/hid/usbhid')
-rw-r--r-- | drivers/hid/usbhid/hid-core.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c index 1b0e07a67d6d..03bd703255a3 100644 --- a/drivers/hid/usbhid/hid-core.c +++ b/drivers/hid/usbhid/hid-core.c | |||
@@ -1041,13 +1041,6 @@ static void usbhid_stop(struct hid_device *hid) | |||
1041 | 1041 | ||
1042 | hid_cancel_delayed_stuff(usbhid); | 1042 | hid_cancel_delayed_stuff(usbhid); |
1043 | 1043 | ||
1044 | if (hid->claimed & HID_CLAIMED_INPUT) | ||
1045 | hidinput_disconnect(hid); | ||
1046 | if (hid->claimed & HID_CLAIMED_HIDDEV) | ||
1047 | hiddev_disconnect(hid); | ||
1048 | if (hid->claimed & HID_CLAIMED_HIDRAW) | ||
1049 | hidraw_disconnect(hid); | ||
1050 | |||
1051 | hid->claimed = 0; | 1044 | hid->claimed = 0; |
1052 | 1045 | ||
1053 | usb_free_urb(usbhid->urbin); | 1046 | usb_free_urb(usbhid->urbin); |
@@ -1085,7 +1078,7 @@ static struct hid_ll_driver usb_hid_driver = { | |||
1085 | .hidinput_input_event = usb_hidinput_input_event, | 1078 | .hidinput_input_event = usb_hidinput_input_event, |
1086 | }; | 1079 | }; |
1087 | 1080 | ||
1088 | static int hid_probe(struct usb_interface *intf, const struct usb_device_id *id) | 1081 | static int usbhid_probe(struct usb_interface *intf, const struct usb_device_id *id) |
1089 | { | 1082 | { |
1090 | struct usb_host_interface *interface = intf->cur_altsetting; | 1083 | struct usb_host_interface *interface = intf->cur_altsetting; |
1091 | struct usb_device *dev = interface_to_usbdev(intf); | 1084 | struct usb_device *dev = interface_to_usbdev(intf); |
@@ -1117,6 +1110,7 @@ static int hid_probe(struct usb_interface *intf, const struct usb_device_id *id) | |||
1117 | hid->ff_init = hid_pidff_init; | 1110 | hid->ff_init = hid_pidff_init; |
1118 | #ifdef CONFIG_USB_HIDDEV | 1111 | #ifdef CONFIG_USB_HIDDEV |
1119 | hid->hiddev_connect = hiddev_connect; | 1112 | hid->hiddev_connect = hiddev_connect; |
1113 | hid->hiddev_disconnect = hiddev_disconnect; | ||
1120 | hid->hiddev_hid_event = hiddev_hid_event; | 1114 | hid->hiddev_hid_event = hiddev_hid_event; |
1121 | hid->hiddev_report_event = hiddev_report_event; | 1115 | hid->hiddev_report_event = hiddev_report_event; |
1122 | #endif | 1116 | #endif |
@@ -1177,7 +1171,7 @@ err: | |||
1177 | return ret; | 1171 | return ret; |
1178 | } | 1172 | } |
1179 | 1173 | ||
1180 | static void hid_disconnect(struct usb_interface *intf) | 1174 | static void usbhid_disconnect(struct usb_interface *intf) |
1181 | { | 1175 | { |
1182 | struct hid_device *hid = usb_get_intfdata(intf); | 1176 | struct hid_device *hid = usb_get_intfdata(intf); |
1183 | struct usbhid_device *usbhid; | 1177 | struct usbhid_device *usbhid; |
@@ -1359,8 +1353,8 @@ MODULE_DEVICE_TABLE (usb, hid_usb_ids); | |||
1359 | 1353 | ||
1360 | static struct usb_driver hid_driver = { | 1354 | static struct usb_driver hid_driver = { |
1361 | .name = "usbhid", | 1355 | .name = "usbhid", |
1362 | .probe = hid_probe, | 1356 | .probe = usbhid_probe, |
1363 | .disconnect = hid_disconnect, | 1357 | .disconnect = usbhid_disconnect, |
1364 | #ifdef CONFIG_PM | 1358 | #ifdef CONFIG_PM |
1365 | .suspend = hid_suspend, | 1359 | .suspend = hid_suspend, |
1366 | .resume = hid_resume, | 1360 | .resume = hid_resume, |