[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <d82e647a0904101852h7f41492epad2226f29124452d@mail.gmail.com>
Date: Sat, 11 Apr 2009 09:52:16 +0800
From: Ming Lei <tom.leiming@...il.com>
To: Andreas Schwab <schwab@...ux-m68k.org>
Cc: kay.sievers@...y.org, greg@...ah.com, cornelia.huck@...ibm.com,
linux-kernel@...r.kernel.org, arjan@...ux.intel.com
Subject: Re: [PATCH] driver core: check bus->match without holding device
lock(v2)
2009/4/10 Andreas Schwab <schwab@...ux-m68k.org>:
> diff --git a/drivers/base/base.h b/drivers/base/base.h
> index ddc9749..087e911 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);
> }
A similar patch has been in greg's tree:
http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/driver-core.current/driver-core-fix-driver_match_device.patch
Thanks!
--
Lei Ming
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists