On Thu, Oct 25, 2012 at 06:02:47PM +0100, Ian Abbott wrote: > >That's trickier. I don't know enough about the comedi layer to answer > >this, but generally, I would stay away from having anyone except the > >driver that set the value, be the ones that can do anything with the > >value. In other words, no magic flags here. > > > >If you want a "magic" flag, use a new variable for it and make it an > >enumerated type. > > It's just that if comedi_pci_auto_config() ends up calling the > driver's auto_attach() method (and that will be the only option > eventually), the context parameter value of the driver's > auto_attach() method either has to be conjured out of thin air (i.e. > it's something the driver never really asked for in the first place > and probably has no interest in unless it handles multiple types of > devices such as PCI and PCMCIA), or we'd also have to add the > context parameter to comedi_pci_auto_config() and pass it through. > > Perhaps comedi_pci_auto_config() &co. should just set the context to > 0 for now (which is really just a _different_ context value the > driver never asked for!). Ugh, yeah, I think that sounds like the best thing to do here. What a mess... greg k-h _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel