[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACxGe6tdOytQT5D0ykptya1gaPeMeeJ0a0K4ZvUE9RmRmGMD0g@mail.gmail.com>
Date: Wed, 7 May 2014 16:21:09 +0100
From: Grant Likely <grant.likely@...aro.org>
To: Frank Rowand <frowand.list@...il.com>
Cc: Rob Herring <robh+dt@...nel.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
Linux Kernel list <linux-kernel@...r.kernel.org>,
Josh Cartwright <joshc@...eaurora.org>,
Courtney Cavin <courtney.cavin@...ymobile.com>,
Samuel Ortiz <sameo@...ux.intel.com>,
Lee Jones <lee.jones@...aro.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: Re: [RFC PATCH 2/3] devicetree: provide hook to allow setting
devicetree device name
On Wed, May 7, 2014 at 1:52 AM, Frank Rowand <frowand.list@...il.com> wrote:
> From: Frank Rowand <frank.rowand@...ymobile.com>
>
> Optionally push devicetree device naming into a function called dynamically by
> of_device_alloc().
>
> TODO:
> Change made to of_device_alloc() could also be made to
> of_amba_device_create()
>
> Signed-off-by: Frank Rowand <frank.rowand@...ymobile.com>
> ---
> drivers/of/platform.c | 2 ++
> include/linux/of.h | 2 ++
> 3 files changed, 43 insertions(+)
>
> Index: b/drivers/of/platform.c
> ===================================================================
> --- a/drivers/of/platform.c
> +++ b/drivers/of/platform.c
> @@ -179,6 +179,8 @@ struct platform_device *of_device_alloc(
>
> if (bus_id)
> dev_set_name(&dev->dev, "%s", bus_id);
> + else if (np->parent->of_device_make_bus_id)
> + np->parent->of_device_make_bus_id(&dev->dev);
This isn't dangerous in the way the first patch is, but I don't want
to expose control over the naming scheme outside of the core code. It
would be too easy to get wrong and mess up other drivers. The problem
that is being hit is clearly a bug in the core DT code. It should be
naming devices so that there isn't a conflict. I think Rob's suggested
patch is the best fix.
g.
--
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