On Wed, May 7, 2014 at 1:52 AM, Frank Rowand <frowand.l...@gmail.com> wrote:
> From: Frank Rowand <frank.row...@sonymobile.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.row...@sonymobile.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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to