On 15/04/15(Wed) 10:46, attila wrote:
> Martin Pieuchot <[email protected]> writes:
> 
> > On 14/04/15(Tue) 15:22, attila wrote:
> >> Martin Pieuchot <[email protected]> writes:
> >> >> 
> >> >> static const struct usb_devno ualea_devs[] = {
> >> >>         { USB_VENDOR_ARANEUS,   USB_PRODUCT_ARANEUS_ALEA }
> >> >> };
> >> >
> >> > Is it possible to match your device based on the content of the device
> >> > descriptor instead of whitelisting IDs?  Whitelisting means that if the
> >> > company produce a compatible device with a new ID we'll need to modify
> >> > the driver.
> >> >
> >> 
> >> Sadly, I don't think it is possible... you mean by looking at
> >> bDeviceClass/bDeviceSubClass/bDeviceProtocol?  He only gives me zeroes
> >> [...]
> >> Perhaps I am misunderstanding; is there something else in there I
> >> could/should match on?  I've changed the attach routine in the updated
> >> version to check vendor/product/iface, at least.
> >
> > I was thinking at bInterfaceClass and bInterfaceProtocol but when they
> > are both to "vendor defined" (255), matching against the ID is the right
> > thing to do. 
> >
> >> I looked and it appears that M_ZERO is used when allocating the memory
> >> for all of these structures, so I take it that explicit zeroing of
> >> things when tearing down is neither required nor desired?  I removed
> >> this kind of thing from ualea.c because it looked like it wasn't
> >> necessary.
> >
> > That's right.
> >
> >> I'm attaching the updated driver.
> >> 
> >> Thank you for the critique.  I suppose I need to write a man page for
> >> this as well... working on it.
> >
> > Perfect, I'll put it in tree together with your driver :)
> >
> 
> Man page attached.  I am also attaching an updated copy of the driver
> (only copyright changed).
> 
> Thanks so much for your help.  I look forward to contributing more.

Committed thanks.  I removed some unneeded headers and applied jmc@'s
tweak.

In the future I'd suggest you to send unified diff against the CVS tree,
it's easier to apply & test!

Cheers,
Martin

Reply via email to