From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pawel Moll Subject: Re: [PATCH v3] platform: Make platform_bus device a platform device Date: Wed, 23 Jul 2014 15:26:53 +0100 Message-ID: <1406125613.25343.140.camel@hornet> References: <20140722173713.GA8959@kroah.com> <1406051719-17354-1-git-send-email-pawel.moll@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: Sender: linux-tegra-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Olof Johansson Cc: Greg Kroah-Hartman , Stephen Warren , Catalin Marinas , Paul Walmsley , Arnd Bergmann , Peter De Schrijver , "arm-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org" , "linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org" List-Id: linux-tegra@vger.kernel.org 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 =3D device_register(&platform_bus); > > + dev_set_name(&platform_bus.dev, "%s", platform_bus.name); > > + error =3D device_register(&platform_bus.dev); > > if (error) > > return error; > > error =3D bus_register(&platform_bus_type); > > - if (error) > > - device_unregister(&platform_bus); > > + if (!error) { > > + platform_bus.dev.of_node =3D of_allnodes; >=20 > This breaks all non-OF platforms: >=20 > drivers/base/platform.c: In function 'platform_bus_init': > drivers/base/platform.c:955:30: error: 'of_allnodes' undeclared (firs= t > use in this function) > platform_bus.dev.of_node =3D 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=C5=82