]> git.zerfleddert.de Git - usb-driver/commitdiff
move card_type into xpcu_s
authorMichael Gernoth <michael@gernoth.net>
Fri, 11 Apr 2008 13:38:01 +0000 (15:38 +0200)
committerMichael Gernoth <michael@gernoth.net>
Fri, 11 Apr 2008 13:38:01 +0000 (15:38 +0200)
usb-driver.c
xpcu.h

index 1a37f54255ec4d098792163def8066eed65b0a0d..9ed0c353bf1f5ca4756eb0b3d06ea4fdeec25071 100644 (file)
@@ -55,7 +55,6 @@ static FILE *modulesfp = NULL;
 static FILE *baseaddrfp = NULL;
 static int baseaddrnum = 0;
 static int modules_read = 0;
 static FILE *baseaddrfp = NULL;
 static int baseaddrnum = 0;
 static int modules_read = 0;
-static unsigned long card_type;
 static int ints_enabled = 0;
 static pthread_mutex_t int_wait = PTHREAD_MUTEX_INITIALIZER;
 
 static int ints_enabled = 0;
 static pthread_mutex_t int_wait = PTHREAD_MUTEX_INITIALIZER;
 
@@ -351,7 +350,7 @@ static int do_wdioctl(int fd, unsigned int request, unsigned char *wdioctl) {
                                                                                           /* TODO: check interfaceClass! */
                                                                                           DPRINTF("found device with libusb\n");
                                                                                           xpcu->dev = dev;
                                                                                           /* TODO: check interfaceClass! */
                                                                                           DPRINTF("found device with libusb\n");
                                                                                           xpcu->dev = dev;
-                                                                                          card_type = e->dwCardType;
+                                                                                          xpcu->card_type = e->dwCardType;
                                                                                   }
                                                                           }
                                                                   }
                                                                                   }
                                                                           }
                                                                   }
@@ -512,7 +511,7 @@ static int do_wdioctl(int fd, unsigned int request, unsigned char *wdioctl) {
                                if (xpcu->dev) {
                                        struct usb_interface *interface = xpcu->dev->config->interface;
 
                                if (xpcu->dev) {
                                        struct usb_interface *interface = xpcu->dev->config->interface;
 
-                                       e->dwCardType = card_type;
+                                       e->dwCardType = xpcu->card_type;
                                        e->dwAction = 1;
                                        e->dwEventId = 109;
                                        e->u.Usb.dwUniqueID = 110;
                                        e->dwAction = 1;
                                        e->dwEventId = 109;
                                        e->u.Usb.dwUniqueID = 110;
diff --git a/xpcu.h b/xpcu.h
index eeb25eba81cb31b081fb5acb2e99803c7f5ea039..bbf5a9da1d37533d647f403998c89765da6fd78a 100644 (file)
--- a/xpcu.h
+++ b/xpcu.h
@@ -7,6 +7,7 @@ struct xpcu_s {
        struct usb_bus *busses;
        int interface;
        int alternate;
        struct usb_bus *busses;
        int interface;
        int alternate;
+       unsigned long card_type;
 };
 
 int __attribute__ ((visibility ("hidden"))) xpcu_deviceinfo(struct xpcu_s *xpcu, unsigned char *buf);
 };
 
 int __attribute__ ((visibility ("hidden"))) xpcu_deviceinfo(struct xpcu_s *xpcu, unsigned char *buf);
Impressum, Datenschutz