On Mon, 2010-08-30 at 00:04 +0200, Hugo "Bonstra" Grostabussiat wrote:
>
> static int dev_discover(struct libusb_device_descriptor *dsc,
> uint32_t *devtype)
> {
> - /* Revision 1 is what we're interested in */
> - if (dsc->bcdDevice == 1)
> + /* Revision 1 and 0.33 are what we're interested in */
> + if (dsc->bcdDevice == 1 || dsc->bcdDevice == 0x0033)
> return 1;
>
> return 0;
> }
The changes to dev_discover are definitely wrong though.
Should be something like:
if (dsc->idProduct == 0x2016) {
if (dsc->bcdDevice == 1)
return 1;
return 0;
}
return 1;
And adjust the comment. We don't want to handle rev 0x0033 for the
147e:2016 product. Another way to do this would be to add a "rev" field
to the usb id table (which is something I thought about after writing
the latest patch).
For the rest of the code, I'd rather you did not rename the fields,
structures and enums to _2016 (and added a comment as to for which
version the structures are for), or that you did it in a separate patch,
otherwise it makes it very hard for me to review the patch.
Right now, there's a bit too much churn for me to see that you're not
breaking the old code.
Finally, any chance you could create your patches against the git
repository? This would allow me to include authorship information.
> static const struct usb_id id_table[] = {
> - { .vendor = 0x147e, .product = 0x2016 },
> + { .vendor = 0x147e, .product = 0x2016, .driver_data =
> UPEKSONLY_2016 },
> + { .vendor = 0x147e, .product = 0x1000, .driver_data =
> UPEKSONLY_1000 },
> { 0, 0, 0, },
> };
Cheers
_______________________________________________
fprint mailing list
[email protected]
http://lists.reactivated.net/mailman/listinfo/fprint