1
0

move card_type into xpcu_s

This commit is contained in:
Michael Gernoth 2008-04-11 15:38:01 +02:00
parent 0c2db148a4
commit 4f3471859a
2 changed files with 3 additions and 3 deletions

View File

@ -55,7 +55,6 @@ static FILE *modulesfp = NULL;
static FILE *baseaddrfp = NULL; static FILE *baseaddrfp = NULL;
static int baseaddrnum = 0; static int baseaddrnum = 0;
static int modules_read = 0; static int modules_read = 0;
static unsigned long card_type;
static int ints_enabled = 0; static int ints_enabled = 0;
static pthread_mutex_t int_wait = PTHREAD_MUTEX_INITIALIZER; 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! */ /* TODO: check interfaceClass! */
DPRINTF("found device with libusb\n"); DPRINTF("found device with libusb\n");
xpcu->dev = dev; 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) { if (xpcu->dev) {
struct usb_interface *interface = xpcu->dev->config->interface; struct usb_interface *interface = xpcu->dev->config->interface;
e->dwCardType = card_type; e->dwCardType = xpcu->card_type;
e->dwAction = 1; e->dwAction = 1;
e->dwEventId = 109; e->dwEventId = 109;
e->u.Usb.dwUniqueID = 110; e->u.Usb.dwUniqueID = 110;

1
xpcu.h
View File

@ -7,6 +7,7 @@ struct xpcu_s {
struct usb_bus *busses; struct usb_bus *busses;
int interface; int interface;
int alternate; 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);