Re: patch bus_add_device-losing-an-error-return-from-the-probe-method.patch added to gregkh-2.6 tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tuesday 04 April 2006 20:23, Rene Herman wrote:
> Rene Herman wrote:
> 
> > As said before, if the behaviour makes sense for other busses, maybe 
> > propagating errors up should be dependent on a flags value somewhere 
> > that a platform-driver sets?
> > 
> > If platform_device_register_simple() never returns an IS_ERR() when the 
> > device is not found that means it's not a useful interface for hardware 
> > that needs to be probed for at the very least. ALSA would need to do 
> > something like, just before returning a succesfull return from the 
> > probe() method, set a global flag that the platform_device that is about 
> > to be registered is actually representing something, and freeing all 
> > platform_devices for which the flag is _not_ set again after this.
> > 
> > Which ofcourse means this is not at all useful. It's just working around 
> > the driver model then...
> 
> Well, we could in fact hang an unregister off device->private_data as 
> per attached example. Wouldn't be _excessively_ ugly. Still sucks 
> though.

Plus it broke all the drivers that create platform devices before
registering drivers or the ones simply not using private data. Given
that some arches have a means to separate device creation from driver
probing (see pcspkr on PPC for exaple) I don;t think this is acceptable.

-- 
Dmitry
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux