summaryrefslogtreecommitdiff
path: root/net/bluetooth
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2009-08-22 21:15:53 (GMT)
committerMarcel Holtmann <marcel@holtmann.org>2009-08-22 21:15:53 (GMT)
commit364f63519d94442ed373ac7da79033c8282df46a (patch)
treeaf17fa090f2525e562396dbb2916199635ca1197 /net/bluetooth
parent290ba200815fdecb4d40dc942499c4ea6d0c4624 (diff)
downloadlinux-fsl-qoriq-364f63519d94442ed373ac7da79033c8282df46a.tar.xz
Bluetooth: Disconnect HIDRAW devices on disconnect
Currently the HID subsystem will create HIDRAW devices for the transport driver, but it will not disconnect them. Until the HID subsytem gets fixed, ensure that HIDRAW and HIDDEV devices are disconnected when the Bluetooth HID device gets removed. Based on a patch from Brian Rogers <brian@xyzw.org> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth')
-rw-r--r--net/bluetooth/hidp/core.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c
index a9f7afb..f912d65 100644
--- a/net/bluetooth/hidp/core.c
+++ b/net/bluetooth/hidp/core.c
@@ -40,6 +40,7 @@
#include <linux/input.h>
#include <linux/hid.h>
+#include <linux/hidraw.h>
#include <net/bluetooth/bluetooth.h>
#include <net/bluetooth/hci_core.h>
@@ -574,6 +575,8 @@ static int hidp_session(void *arg)
if (session->hid) {
if (session->hid->claimed & HID_CLAIMED_INPUT)
hidinput_disconnect(session->hid);
+ if (session->hid->claimed & HID_CLAIMED_HIDRAW)
+ hidraw_disconnect(session->hid);
hid_destroy_device(session->hid);
}