On Wed, 9 Oct 2019, Bastien Nocera wrote: > > This would be better if you allowed matching against just the > > idVendor > > field rather than matching against both. That would make it a lot > > simpler to match all Apple devices, for instance. > > That should already be possible. The matching code is the same as for > the USB interface drivers. > > Something like: > static const struct usb_device_id apple_match[] = { > { .match_flags = USB_DEVICE_ID_MATCH_VENDOR, > .idVendor = USB_VENDOR_APPLE > }, > {} > } > > And I couldn't use it in patch 5/5, as that's a range of product IDs, > not all of them (which would be quite a lot more). You can still use it in patch 5/5. Match any device with Apple's VID; then have the probe routine return -ENODEV if the PID is outside the range you want. Alan Stern