[lkml]   [2003]   [Jan]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Patch: linux-2.5.58/drivers/base/bus.c ignored pre-existing devices
On 2003-01-15, Patrick Mochel wrote:
>The extra code was an attempt at properly handling failure of ->probe(),
>and to make sure that an error from ->probe() (e.g. -ENOMEM) is propogated
>The cause of the problem you're seeing is that if a device wasn't bound to
>a driver, -ENODEV was returned, causing it to be removed from the bus's
>list of devices.
>To remedy this, I've changed the semantics of bus_match() to return the
>* 1 if device was bound to a driver.
>* 0 if it wasn't
>* <0 if drv->probe() returned an error.
>This allows the caller to know if binding happened, as well as bubble the
>error up.

I have't tried your patch, but, from reading it, I infer that
your patch would not work with drivers that do further matching
in their probe function and return -ENODEV, which should be handled
as if match() function failed. I suggest you use my patch.

Adam J. Richter __ ______________ 575 Oroville Road \ / Milpitas, California 95035
+1 408 309-6081 | g g d r a s i l United States of America
"Free Software For The Rest Of Us."
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:32    [W:0.029 / U:2.964 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site