usb-device: Autodetect Nokia 770 device from product string

This commit is contained in:
Pali Rohár committed 2016-02-23 18:23:04 +01:00
1 parent 6952d73082
commit aeb9e897db
1 file changed
+3 -1
+3 -1
View File
@@ -206,7 +206,9 @@ static struct usb_device_info * usb_device_is_valid(struct libusb_device * dev)
return NULL; return NULL;
} }
if ( strstr(product, "N900") ) if ( strncmp(product, "Nokia 770", sizeof("Nokia 770")-1) == 0 )
ret->device = DEVICE_SU_18;
else if ( strstr(product, "N900") )
ret->device = DEVICE_RX_51; ret->device = DEVICE_RX_51;
else else
ret->device = DEVICE_UNKNOWN; ret->device = DEVICE_UNKNOWN;