From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Gortmaker Subject: [PATCH 1/3] ARM: mach-omap2: remove bogus "or_module" from rx51-peripherals Date: Wed, 20 Jul 2016 00:13:30 -0400 Message-ID: <20160720041332.30789-2-paul.gortmaker@windriver.com> References: <20160720041332.30789-1-paul.gortmaker@windriver.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: In-Reply-To: <20160720041332.30789-1-paul.gortmaker@windriver.com> Sender: linux-kernel-owner@vger.kernel.org To: linux-kernel@vger.kernel.org Cc: Paul Gortmaker , Tony Lindgren , Russell King , Linus Walleij , Alexandre Courbot , linux-omap@vger.kernel.org, linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org List-Id: linux-gpio@vger.kernel.org During unrelated work, attempting to remove an include of the linux/module.h in favour of "struct module;" in order to reduce header entanglement, we found doing so caused a build failure in this file. It turns out this file uses __init_or_module which lives in the module.h header, but it wasn't including module.h -- which was being masked by the module.h in include/linux/gpio/driver.h - the one we want to remove/replace. However, if we dig into Makefile / Kconfig we find: mach-omap2/board-rx51-peripherals.o ----> mach-omap2/Makefile:obj-$(CONFIG_MACH_NOKIA_RX51) += board-rx51-peripherals.o arch/arm/mach-omap2/Kconfig:config MACH_NOKIA_RX51 arch/arm/mach-omap2/Kconfig: bool "Nokia N900 (RX-51) phone" ...and hence the __init_or_module is pointless, as it will always evaluate to plain __init. With ARM and GPIO being different subsystems, we'll need to get this in ARM 1st, and then wait a release before changing the GPIO header, otherwise we'll risk triggering build failures. Cc: Tony Lindgren Cc: Russell King Cc: Linus Walleij Cc: Alexandre Courbot Cc: linux-omap@vger.kernel.org Cc: linux-gpio@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Paul Gortmaker --- arch/arm/mach-omap2/board-rx51-peripherals.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c index a5ab712c1a59..4ddda1d33ec1 100644 --- a/arch/arm/mach-omap2/board-rx51-peripherals.c +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c @@ -978,7 +978,7 @@ static struct twl4030_platform_data rx51_twldata __initdata = { .vio = &rx51_vio, }; -static struct tpa6130a2_platform_data rx51_tpa6130a2_data __initdata_or_module = { +static struct tpa6130a2_platform_data rx51_tpa6130a2_data __initdata = { .power_gpio = 98, }; -- 2.8.4 From mboxrd@z Thu Jan 1 00:00:00 1970 From: paul.gortmaker@windriver.com (Paul Gortmaker) Date: Wed, 20 Jul 2016 00:13:30 -0400 Subject: [PATCH 1/3] ARM: mach-omap2: remove bogus "or_module" from rx51-peripherals In-Reply-To: <20160720041332.30789-1-paul.gortmaker@windriver.com> References: <20160720041332.30789-1-paul.gortmaker@windriver.com> Message-ID: <20160720041332.30789-2-paul.gortmaker@windriver.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org During unrelated work, attempting to remove an include of the linux/module.h in favour of "struct module;" in order to reduce header entanglement, we found doing so caused a build failure in this file. It turns out this file uses __init_or_module which lives in the module.h header, but it wasn't including module.h -- which was being masked by the module.h in include/linux/gpio/driver.h - the one we want to remove/replace. However, if we dig into Makefile / Kconfig we find: mach-omap2/board-rx51-peripherals.o ----> mach-omap2/Makefile:obj-$(CONFIG_MACH_NOKIA_RX51) += board-rx51-peripherals.o arch/arm/mach-omap2/Kconfig:config MACH_NOKIA_RX51 arch/arm/mach-omap2/Kconfig: bool "Nokia N900 (RX-51) phone" ...and hence the __init_or_module is pointless, as it will always evaluate to plain __init. With ARM and GPIO being different subsystems, we'll need to get this in ARM 1st, and then wait a release before changing the GPIO header, otherwise we'll risk triggering build failures. Cc: Tony Lindgren Cc: Russell King Cc: Linus Walleij Cc: Alexandre Courbot Cc: linux-omap at vger.kernel.org Cc: linux-gpio at vger.kernel.org Cc: linux-arm-kernel at lists.infradead.org Signed-off-by: Paul Gortmaker --- arch/arm/mach-omap2/board-rx51-peripherals.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c index a5ab712c1a59..4ddda1d33ec1 100644 --- a/arch/arm/mach-omap2/board-rx51-peripherals.c +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c @@ -978,7 +978,7 @@ static struct twl4030_platform_data rx51_twldata __initdata = { .vio = &rx51_vio, }; -static struct tpa6130a2_platform_data rx51_tpa6130a2_data __initdata_or_module = { +static struct tpa6130a2_platform_data rx51_tpa6130a2_data __initdata = { .power_gpio = 98, }; -- 2.8.4 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751220AbcGTEOe (ORCPT ); Wed, 20 Jul 2016 00:14:34 -0400 Received: from mail5.windriver.com ([192.103.53.11]:35302 "EHLO mail5.wrs.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750766AbcGTEOc (ORCPT ); Wed, 20 Jul 2016 00:14:32 -0400 From: Paul Gortmaker To: CC: Paul Gortmaker , Tony Lindgren , Russell King , Linus Walleij , Alexandre Courbot , , , Subject: [PATCH 1/3] ARM: mach-omap2: remove bogus "or_module" from rx51-peripherals Date: Wed, 20 Jul 2016 00:13:30 -0400 Message-ID: <20160720041332.30789-2-paul.gortmaker@windriver.com> X-Mailer: git-send-email 2.8.4 In-Reply-To: <20160720041332.30789-1-paul.gortmaker@windriver.com> References: <20160720041332.30789-1-paul.gortmaker@windriver.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org During unrelated work, attempting to remove an include of the linux/module.h in favour of "struct module;" in order to reduce header entanglement, we found doing so caused a build failure in this file. It turns out this file uses __init_or_module which lives in the module.h header, but it wasn't including module.h -- which was being masked by the module.h in include/linux/gpio/driver.h - the one we want to remove/replace. However, if we dig into Makefile / Kconfig we find: mach-omap2/board-rx51-peripherals.o ----> mach-omap2/Makefile:obj-$(CONFIG_MACH_NOKIA_RX51) += board-rx51-peripherals.o arch/arm/mach-omap2/Kconfig:config MACH_NOKIA_RX51 arch/arm/mach-omap2/Kconfig: bool "Nokia N900 (RX-51) phone" ...and hence the __init_or_module is pointless, as it will always evaluate to plain __init. With ARM and GPIO being different subsystems, we'll need to get this in ARM 1st, and then wait a release before changing the GPIO header, otherwise we'll risk triggering build failures. Cc: Tony Lindgren Cc: Russell King Cc: Linus Walleij Cc: Alexandre Courbot Cc: linux-omap@vger.kernel.org Cc: linux-gpio@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Paul Gortmaker --- arch/arm/mach-omap2/board-rx51-peripherals.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c index a5ab712c1a59..4ddda1d33ec1 100644 --- a/arch/arm/mach-omap2/board-rx51-peripherals.c +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c @@ -978,7 +978,7 @@ static struct twl4030_platform_data rx51_twldata __initdata = { .vio = &rx51_vio, }; -static struct tpa6130a2_platform_data rx51_tpa6130a2_data __initdata_or_module = { +static struct tpa6130a2_platform_data rx51_tpa6130a2_data __initdata = { .power_gpio = 98, }; -- 2.8.4