From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933450AbbENNyR (ORCPT ); Thu, 14 May 2015 09:54:17 -0400 Received: from foss.arm.com ([217.140.101.70]:39352 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933198AbbENNyP (ORCPT ); Thu, 14 May 2015 09:54:15 -0400 Message-ID: <5554A903.8040605@arm.com> Date: Thu, 14 May 2015 14:54:11 +0100 From: Sudeep Holla User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: "linux-kernel@vger.kernel.org" , "devicetree@vger.kernel.org" , Rob Herring CC: Rob Herring , Sudeep Holla , "grant.likely@linaro.org" , Pawel Moll , Benjamin Herrenschmidt , Greg Kroah-Hartman Subject: Re: [PATCH] drivers: of/base: move of_init to driver_init References: <1431595695-17103-1-git-send-email-sudeep.holla@arm.com> In-Reply-To: <1431595695-17103-1-git-send-email-sudeep.holla@arm.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 14/05/15 10:28, Sudeep Holla wrote: > Commit 5590f3196b29 ("drivers/core/of: Add symlink to device-tree from > devices with an OF node") adds the symlink `of_node` for each device > pointing to it's device tree node while creating/initialising it. > > However the devicetree sysfs is created and setup in of_init which is > executed at core_initcall level. For all the devices created before > of_init, the following error is thrown: > "Error -2(-ENOENT) creating of_node link" > > Like many other components in driver model, initialize the sysfs support > for OF/devicetree from driver_init so that it's ready before any devices > are created. > > Fixes: 5590f3196b29 ("drivers/core/of: Add symlink to device-tree from > devices with an OF node") > Suggested-by: Rob Herring > Cc: Grant Likely > Cc: Rob Herring > Cc: Pawel Moll > Cc: Benjamin Herrenschmidt > Cc: Greg Kroah-Hartman > Signed-off-by: Sudeep Holla > --- > drivers/base/init.c | 2 ++ > drivers/of/base.c | 8 +++----- > include/linux/of.h | 6 ++++++ > 3 files changed, 11 insertions(+), 5 deletions(-) > Looks like we still have conflict even though the one I pointed was in bootwrapper. Kbuilder reported the following build error: drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowof.c:45:1: error: conflicting types for 'of_init' of_init(struct nvkm_bios *bios, const char *name) ^ In file included from arch/powerpc/include/asm/prom.h:23:0, from arch/powerpc/include/asm/pci.h:20, from include/linux/pci.h:1460, from drivers/gpu/drm/nouveau/include/nvif/os.h:7, from drivers/gpu/drm/nouveau/include/nvkm/core/os.h:3, from drivers/gpu/drm/nouveau/include/nvkm/core/object.h:3, from drivers/gpu/drm/nouveau/include/nvkm/core/subdev.h:3, from drivers/gpu/drm/nouveau/include/nvkm/subdev/bios.h:3, from drivers/gpu/drm/nouveau/nvkm/subdev/bios/priv.h:3, from drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowof.c:23: include/linux/of.h:124:6: note: previous declaration of 'of_init' was here void of_init(void); ^ Sorry I couldn't catch this with any ppc defconfigs. Please ignore this version, will repost updated one soon renaming to of_core_init as initially discussed. Regards, Sudeep