From: tom.leiming@gmail.com
To: greg@kroah.com
Cc: linux-kernel@vger.kernel.org, g.liakhovetski@gmx.de,
Ming Lei <tom.leiming@gmail.com>
Subject: [PATCH] driver core:fix driver_match_device
Date: Fri, 27 Mar 2009 21:50:00 +0800 [thread overview]
Message-ID: <1238161800-4714-1-git-send-email-tom.leiming@gmail.com> (raw)
From: Ming Lei <tom.leiming@gmail.com>
This patch fixes a bug introduced in commit
49b420a13ff95b449947181190b08367348e3e1b.
If a instance of bus_type doesn't have .match method,
all .probe of drivers in the bus should be called, or else
the .probe have not a chance to be called.
Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Reported-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
drivers/base/base.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/base/base.h b/drivers/base/base.h
index ddc9749..b528145 100644
--- a/drivers/base/base.h
+++ b/drivers/base/base.h
@@ -115,7 +115,7 @@ extern int driver_probe_device(struct device_driver *drv, struct device *dev);
static inline int driver_match_device(struct device_driver *drv,
struct device *dev)
{
- return drv->bus->match && drv->bus->match(dev, drv);
+ return drv->bus->match ? drv->bus->match(dev, drv) : 1;
}
extern void sysdev_shutdown(void);
--
1.6.0.GIT
next reply other threads:[~2009-03-27 13:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-27 13:50 tom.leiming [this message]
2009-04-17 10:41 ` Guennadi Liakhovetski
2009-04-17 15:31 ` Greg KH
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=1238161800-4714-1-git-send-email-tom.leiming@gmail.com \
--to=tom.leiming@gmail.com \
--cc=g.liakhovetski@gmx.de \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.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
Powered by JetHome