[PATCH v3] platform: Make platform_bus device a platform device

Pawel Moll pawel.moll at arm.com
Wed Jul 23 07:26:53 PDT 2014


On Tue, 2014-07-22 at 20:46 +0100, Olof Johansson wrote:
> > @@ -946,12 +946,18 @@ int __init platform_bus_init(void)
> >
> >         early_platform_cleanup();
> >
> > -       error = device_register(&platform_bus);
> > +       dev_set_name(&platform_bus.dev, "%s", platform_bus.name);
> > +       error = device_register(&platform_bus.dev);
> >         if (error)
> >                 return error;
> >         error =  bus_register(&platform_bus_type);
> > -       if (error)
> > -               device_unregister(&platform_bus);
> > +       if (!error) {
> > +               platform_bus.dev.of_node = of_allnodes;
> 
> This breaks all non-OF platforms:
> 
> drivers/base/platform.c: In function 'platform_bus_init':
> drivers/base/platform.c:955:30: error: 'of_allnodes' undeclared (first
> use in this function)
>    platform_bus.dev.of_node = of_allnodes;

Right, of course, my bad. I can't see any other way of getting the tree
root, so an #ifdef it will be...

Thanks for pointing this out!

Paweł




More information about the linux-arm-kernel mailing list