public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] driver core:fix driver_match_device
@ 2009-03-27 13:50 tom.leiming
  2009-04-17 10:41 ` Guennadi Liakhovetski
  0 siblings, 1 reply; 3+ messages in thread
From: tom.leiming @ 2009-03-27 13:50 UTC (permalink / raw)
  To: greg; +Cc: linux-kernel, g.liakhovetski, Ming Lei

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] driver core:fix driver_match_device
  2009-03-27 13:50 [PATCH] driver core:fix driver_match_device tom.leiming
@ 2009-04-17 10:41 ` Guennadi Liakhovetski
  2009-04-17 15:31   ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Guennadi Liakhovetski @ 2009-04-17 10:41 UTC (permalink / raw)
  To: Ming Lei; +Cc: Greg KH, linux-kernel

On Fri, 27 Mar 2009, tom.leiming@gmail.com wrote:

> 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>

It looks like this patch is _still_ not in the mainline - now that we are 
past rc2... Unless the problem has been fixed differently (I haven't 
tested recent kernels), can we __please__ get it upstream?

Thanks
Guennadi

> ---
>  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
> 

---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] driver core:fix driver_match_device
  2009-04-17 10:41 ` Guennadi Liakhovetski
@ 2009-04-17 15:31   ` Greg KH
  0 siblings, 0 replies; 3+ messages in thread
From: Greg KH @ 2009-04-17 15:31 UTC (permalink / raw)
  To: Guennadi Liakhovetski; +Cc: Ming Lei, linux-kernel

On Fri, Apr 17, 2009 at 12:41:21PM +0200, Guennadi Liakhovetski wrote:
> On Fri, 27 Mar 2009, tom.leiming@gmail.com wrote:
> 
> > 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>
> 
> It looks like this patch is _still_ not in the mainline - now that we are 
> past rc2... Unless the problem has been fixed differently (I haven't 
> tested recent kernels), can we __please__ get it upstream?

It's in my queue to go to Linus today.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-04-17 15:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-27 13:50 [PATCH] driver core:fix driver_match_device tom.leiming
2009-04-17 10:41 ` Guennadi Liakhovetski
2009-04-17 15:31   ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox