From: "Adam J. Richter" <adam@yggdrasil.com>
To: mochel@osdl.org
Cc: felix-linuxkernel@fefe.de, greg@kroah.com,
linux-kernel@vger.kernel.org, tomlins@cam.org
Subject: Re: Patch: linux-2.5.58/drivers/base/bus.c ignored pre-existing devices
Date: Wed, 15 Jan 2003 14:01:36 -0800 [thread overview]
Message-ID: <200301152201.OAA02047@adam.yggdrasil.com> (raw)
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
>up.
>
>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
>following:
>
>* 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
adam@yggdrasil.com \ / 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."
next reply other threads:[~2003-01-15 21:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-15 22:01 Adam J. Richter [this message]
-- strict thread matches above, loose matches on Subject: below --
2003-01-15 10:52 Adam J. Richter
2003-01-15 16:23 ` Patrick Mochel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200301152201.OAA02047@adam.yggdrasil.com \
--to=adam@yggdrasil.com \
--cc=felix-linuxkernel@fefe.de \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mochel@osdl.org \
--cc=tomlins@cam.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®