Skip to content

Commit b693843

Browse files
committed
Fix devices freeze
1 parent a6a622f commit b693843

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

libusb/hid.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1251,6 +1251,10 @@ void HID_API_EXPORT hid_close(hid_device *dev)
12511251
/* release the interface */
12521252
libusb_release_interface(dev->device_handle, dev->interface);
12531253

1254+
#ifdef DETACH_KERNEL_DRIVER
1255+
libusb_attach_kernel_driver(dev->device_handle, dev->interface);
1256+
#endif
1257+
12541258
/* Close the handle */
12551259
libusb_close(dev->device_handle);
12561260

0 commit comments

Comments
 (0)