On 2013/01/07 10:14 PM, Greg Kroah-Hartman wrote: > On Tue, Dec 04, 2012 at 04:28:11PM +0000, Ian Abbott wrote: >> On 2012-12-04 14:10, Dan Carpenter wrote: >>> You guys have taken some unused code and made it more and more >>> flexible. I think you should just delete the parameter. When you >>> need a parameter, then we can add it back. If you need two >>> parameters then we can add two of them. >> >> The one current driver that might have a use for it is the vmk80xx >> driver. That one has `driver_info` values in its USB device table, >> but the driver currently uses that in its USB probe routine to >> allocate and initialize a load of stuff before it calls >> comedi_usb_auto_config(). If the driver was changed to remove the >> manual attachment functionality (the `attach` handler), I think all >> that stuff could be moved to the `auto_attach` handler, in which >> case setting the context parameter to the `driver_info` value would >> be useful. > > Yeah, but to force this extra parameter on all other drivers just > because one could use it, isn't the nicest. > > I'd prefer the driver_info use if at all possible, as that's what it is > there for. So I'd like to not apply either of the patches in this > thread, ok? It's fine with me as I only proposed the patch as an alternative to Hartley's patch that passed through a pointer to the whole `struct pci_device_id` or `struct usb_device_id`. Any driver that really needs to pass a context value can just call comedi_auto_config() directly (which takes a context value) instead of the one-line wrappers around that function, comedi_usb_auto_config() and comedi_pci_auto_config() that just set the context to a dummy value 0. -- -=( Ian Abbott @ MEV Ltd. E-mail: <abbotti@xxxxxxxxx> )=- -=( Tel: +44 (0)161 477 1898 FAX: +44 (0)161 718 3587 )=- _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel