fix meizu_dfu's buggy usb device id matching

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18373 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Frank Gevaerts 2008-08-31 20:50:07 +00:00
parent 1867f24189
commit 6e24db0c82

View file

@ -121,6 +121,7 @@ void init_img(image_data_t *img, const char *filename, image_attr_t *attr)
#define DFU_VEN 0x0419 #define DFU_VEN 0x0419
#define DFU_DEV 0x0141 #define DFU_DEV 0x0141
#define DFU_DEV_M6SL 0x0145
usb_dev_handle *device; usb_dev_handle *device;
int timeout = 0xa0000; int timeout = 0xa0000;
@ -139,7 +140,8 @@ void usb_dev_open()
for (bus = usb_get_busses(); bus != NULL; bus = bus->next) for (bus = usb_get_busses(); bus != NULL; bus = bus->next)
for (dev = bus->devices; dev != NULL; dev = dev->next) for (dev = bus->devices; dev != NULL; dev = dev->next)
if (dev->descriptor.idVendor == DFU_VEN if (dev->descriptor.idVendor == DFU_VEN
|| dev->descriptor.idProduct == DFU_DEV) && ( dev->descriptor.idProduct == DFU_DEV
|| dev->descriptor.idProduct == DFU_DEV_M6SL))
goto found; goto found;
printf("\nNo device found, exiting.\n"); printf("\nNo device found, exiting.\n");