aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMing Lei <tom.leiming@gmail.com>2009-03-27 09:50:00 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2009-04-16 19:17:09 -0400
commit5247aecfe62266ffdedf2fc9e4243638554455b6 (patch)
treecb9650d4bc0755d172d5d8ad3b30bfa0b2821b59 /drivers
parentd110271e1f4140a9fb06d968b1afe9ca56a6064e (diff)
driver core: fix driver_match_device
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> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/base/base.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/base.h b/drivers/base/base.h
index ddc97496db4a..b528145a078f 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);
115static inline int driver_match_device(struct device_driver *drv, 115static inline int driver_match_device(struct device_driver *drv,
116 struct device *dev) 116 struct device *dev)
117{ 117{
118 return drv->bus->match && drv->bus->match(dev, drv); 118 return drv->bus->match ? drv->bus->match(dev, drv) : 1;
119} 119}
120 120
121extern void sysdev_shutdown(void); 121extern void sysdev_shutdown(void);