From tom.leiming@gmail.com Mon Apr 6 12:10:53 2009 From: Ming Lei Date: Fri, 27 Mar 2009 21:50:00 +0800 Subject: driver core: fix driver_match_device To: greg@kroah.com Cc: g.liakhovetski@gmx.de, Ming Lei Message-ID: <1238161800-4714-1-git-send-email-tom.leiming@gmail.com> From: Ming Lei 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 Reported-by: Guennadi Liakhovetski Signed-off-by: Greg Kroah-Hartman --- drivers/base/base.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/base/base.h +++ b/drivers/base/base.h @@ -115,7 +115,7 @@ extern int driver_probe_device(struct de 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);