[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170424073232.GA19970@kroah.com>
Date: Mon, 24 Apr 2017 08:32:32 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Wei Li <weili@...eaurora.org>
Cc: linux-kernel@...r.kernel.org, vatsa@...eaurora.org
Subject: Re: [PATCH] driver-core: remove lock for platform devices during
probe
On Mon, Apr 24, 2017 at 01:42:16PM +0800, Wei Li wrote:
> During driver probe procedure, lock on the parent of
> platform devices could be removed to make probe in
> parallel.
>
> Signed-off-by: Wei Li <weili@...eaurora.org>
Why? Why does this matter?
> ---
> drivers/base/dd.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/base/dd.c b/drivers/base/dd.c
> index a1fbf55..e238fbc 100644
> --- a/drivers/base/dd.c
> +++ b/drivers/base/dd.c
> @@ -25,6 +25,7 @@
> #include <linux/async.h>
> #include <linux/pm_runtime.h>
> #include <linux/pinctrl/devinfo.h>
> +#include <linux/platform_device.h>
>
> #include "base.h"
> #include "power/power.h"
> @@ -749,13 +750,14 @@ static int __driver_attach(struct device *dev, void *data)
> return ret;
> } /* ret > 0 means positive match */
>
> - if (dev->parent) /* Needed for USB */
> + if (dev->parent &&
> + (dev->bus != &platform_bus_type)) /* Needed for USB */
The platform_bus_type check is not needed by USB, right?
thanks,
greg k-h
Powered by blists - more mailing lists