Messages in this thread | | | Date | Thu, 06 Apr 2006 21:41:10 +0200 | From | Takashi Iwai <> | Subject | Re: [ALSA 1/2] continue on IS_ERR from platform device registration |
| |
At Thu, 06 Apr 2006 04:08:34 +0200, Rene Herman wrote: > > Rene Herman wrote: > > > Yes. I don't see a significantly cleaner solution then than the > > slightly hackish "using drvdata as a private success flag" that I > > posted before. Example patch versus snd_adlib attached again. This > > seems to work well. > > > > Takashi: do you agree? If the probe() method return is not going to > > be propagated up, there are few other options. > > > > (Continuing the loop on IS_ERR(device) is then also a bit > > questionable again as the IS_ERR then signifies an eror in the bowels > > of the device model, but I feel it's still the correct thing to do) > > If you do agree, here's both patches generated against 2.6.17-rc1-mm1. > First, the continue on IS_ERR one again.
Well, I'm not so confident that it's the way to go.
The problem is that currently the ALSA ISA driver wants to refuse loading (and modprobe returns an error) when no devices are found at loading time. On 2.2/2.4 kernels, PCI drivers also show the same behavior, but it was changed for a good reason.
Then, shouldn't be the ISA drivers changed to follow the same style? That is, we keep pnp_driver and platform_driver regardless probe calls succeeded or not. They can be, in theory, later bound/activated over sysfs.
At least it would make the code more simpler, I guess.
Takashi - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |