]> git.zerfleddert.de Git - usb-driver/blobdiff - usb-driver.c
add xpcu_close
[usb-driver] / usb-driver.c
index 53a0309f6b93cc555770288519c74fd7e93dd2c1..566b10b0d8e056c49675198f0a0f0adac1f7bedb 100644 (file)
@@ -633,13 +633,9 @@ int close(int fd) {
        if (fd == windrvrfd && windrvrfd >= 0) {
                DPRINTF("close windrvrfd\n");
 
-               if (xpcu->handle) {
-                       xpcu_claim(xpcu, XPCU_RELEASE);
-                       usb_close(xpcu->handle);
-               }
+               if (xpcu)
+                       xpcu_close(xpcu);
 
-               xpcu->handle = NULL;
-               xpcu->interface = -1;
                xpcu = NULL;
                windrvrfd = -1;
        }
Impressum, Datenschutz