From patchwork Tue May 31 06:37:24 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 98027 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Received: from canuck.infradead.org (canuck.infradead.org [134.117.69.58]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 6013EB6F57 for ; Tue, 31 May 2011 22:27:08 +1000 (EST) Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QRIa9-00069a-Gy; Tue, 31 May 2011 06:37:37 +0000 Received: from metis.ext.pengutronix.de ([2001:6f8:1178:4:290:27ff:fe1d:cc33]) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QRIa5-00069G-8c for linux-arm-kernel@lists.infradead.org; Tue, 31 May 2011 06:37:34 +0000 Received: from octopus.hi.pengutronix.de ([2001:6f8:1178:2:215:17ff:fe12:23b0]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1QRIZy-0003G6-OY; Tue, 31 May 2011 08:37:26 +0200 Received: from ukl by octopus.hi.pengutronix.de with local (Exim 4.76) (envelope-from ) id 1QRIZw-0007YE-7Z; Tue, 31 May 2011 08:37:24 +0200 Date: Tue, 31 May 2011 08:37:24 +0200 From: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= To: Shawn Guo Subject: Re: [PATCH 2/3] ARM: mx5: convert to new leds-gpio registration helper Message-ID: <20110531063723.GR9907@pengutronix.de> References: <1306609503-31746-1-git-send-email-u.kleine-koenig@pengutronix.de> <1306609503-31746-2-git-send-email-u.kleine-koenig@pengutronix.de> <20110531052032.GA32080@S2100-06.ap.freescale.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20110531052032.GA32080@S2100-06.ap.freescale.net> User-Agent: Mutt/1.5.21 (2010-09-15) X-SA-Exim-Connect-IP: 2001:6f8:1178:2:215:17ff:fe12:23b0 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-arm-kernel@lists.infradead.org X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110531_023733_731805_3E9C1128 X-CRM114-Status: GOOD ( 24.14 ) X-Spam-Score: -0.0 (/) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain Cc: Fabio Estevam , linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org Hi Shawn, On Tue, May 31, 2011 at 01:20:33PM +0800, Shawn Guo wrote: > On Sat, May 28, 2011 at 09:05:02PM +0200, Uwe Kleine-König wrote: > > This gets rid of per machine struct platform_device definitions and allows > > to move the platform data and led definition to .init.rodata. > > > > Signed-off-by: Uwe Kleine-König > > --- > > arch/arm/mach-mx5/Kconfig | 4 ++++ > > arch/arm/mach-mx5/board-mx51_efikamx.c | 15 ++++----------- > > arch/arm/mach-mx5/board-mx51_efikasb.c | 16 ++++------------ > > arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c | 18 +++--------------- > > arch/arm/mach-mx5/eukrea_mbimxsd-baseboard.c | 19 ++++--------------- > > 5 files changed, 19 insertions(+), 53 deletions(-) > > > I'm building Sascha's imx-for-3.0 tree where this patch got applied, > and seeing the following. > > CC arch/arm/mach-mx5/board-mx51_efikamx.o > arch/arm/mach-mx5/board-mx51_efikamx.c: In function ‘mx51_efikamx_init’: > arch/arm/mach-mx5/board-mx51_efikamx.c:241:3: error: assignment of read-only location ‘mx51_efikamx_leds[2]’ > arch/arm/mach-mx5/board-mx51_efikamx.c:244:2: error: implicit declaration of function ‘gpio_leds_register_device’ huh, Sascha, can you please squash the following into the patch you applied. (Or should I create a proper patch such that you don't need to rebase?) Hhhhm, I was pretty sure I build tested that patch, it seems I did not. Thanks Shawn for noticing. Uwe diff --git a/arch/arm/mach-mx5/board-mx51_efikamx.c b/arch/arm/mach-mx5/board-mx51_efikamx.c index f38fb63..2400f6d 100644 --- a/arch/arm/mach-mx5/board-mx51_efikamx.c +++ b/arch/arm/mach-mx5/board-mx51_efikamx.c @@ -139,7 +139,7 @@ static void __init mx51_efikamx_board_id(void) } } -static const struct gpio_led mx51_efikamx_leds[] __initconst = { +static struct gpio_led mx51_efikamx_leds[] __initdata = { { .name = "efikamx:green", .default_trigger = "default-on", @@ -241,7 +241,7 @@ static void __init mx51_efikamx_init(void) mx51_efikamx_leds[2].default_trigger = "mmc1"; } - gpio_leds_register_device(&mx51_efikamx_leds_data); + gpio_led_register_device(-1, &mx51_efikamx_leds_data); imx_add_gpio_keys(&mx51_efikamx_powerkey_data); if (system_rev == 0x11) { diff --git a/arch/arm/mach-mx5/board-mx51_efikasb.c b/arch/arm/mach-mx5/board-mx51_efikasb.c index dbf9d92..28d6896 100644 --- a/arch/arm/mach-mx5/board-mx51_efikasb.c +++ b/arch/arm/mach-mx5/board-mx51_efikasb.c @@ -249,7 +249,7 @@ static void __init efikasb_board_init(void) mx51_efikasb_usb(); imx51_add_sdhci_esdhc_imx(1, NULL); - gpio_leds_register_device(-1, &mx51_efikasb_leds_data); + gpio_led_register_device(-1, &mx51_efikasb_leds_data); imx_add_gpio_keys(&mx51_efikasb_keys_data); }