Diff of /libeilin/eilin.c [680b34] .. [928704] Maximize Restore

  Switch to side-by-side view

--- a/libeilin/eilin.c
+++ b/libeilin/eilin.c
@@ -161,7 +161,6 @@
     }
 
     if (libusb_kernel_driver_active(device->handle, bInterfaceNumber)) {
-        device->reattach_driver = 1;
         if (libusb_detach_kernel_driver(device->handle, bInterfaceNumber)) {
             // close handle and deinitialize libusb
             libusb_close(device->handle);
@@ -169,8 +168,6 @@
             fprintf(stderr, "Error while detaching kernel driver\n");
             return NULL;
         }
-    } else {
-        device->reattach_driver = 0;
     }
 
     /**********************/
@@ -548,9 +545,6 @@
 /************************/
 void cleanupLibusb(eilin_device* device) {
     if (device->handle) {
-        if (device->reattach_driver) {
-            libusb_attach_kernel_driver(device->handle, bInterfaceNumber);
-        }
         libusb_close(device->handle);
     }
     device->handle = NULL;