OSDN Git Service

Unpair HID device cleanup
authorCasper Bonde <c.bonde@samsung.com>
Fri, 3 Oct 2014 08:01:36 +0000 (10:01 +0200)
committerAndre Eisenbach <eisenbach@google.com>
Mon, 27 Jul 2015 17:48:43 +0000 (17:48 +0000)
When unparing HID devices, the attr_mask was not cleared.
By not clearing this data, some HID device will never be able
to connect again. (E.g. the Apple Magic Mouse)

Bug: 15566403
Change-Id: Ic80909dcecdf48d967c1a936b31554653761fa42
Signed-off-by: Casper Bonde <c.bonde@samsung.com>
stack/hid/hidh_api.c

index b0c3aa5..2f919f4 100644 (file)
@@ -397,7 +397,7 @@ tHID_STATUS HID_HostRemoveDev ( UINT8 dev_handle )
     hh_cb.devices[dev_handle].in_use = FALSE;
     hh_cb.devices[dev_handle].conn.conn_state = HID_CONN_STATE_UNUSED;
     hh_cb.devices[dev_handle].conn.ctrl_cid = hh_cb.devices[dev_handle].conn.intr_cid = 0;
-
+    hh_cb.devices[dev_handle].attr_mask = 0;
     return HID_SUCCESS;
 }