linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: u.kleine-koenig@pengutronix.de (Uwe Kleine-König)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/3] ARM: mx5: convert to new leds-gpio registration helper
Date: Tue, 31 May 2011 08:37:24 +0200	[thread overview]
Message-ID: <20110531063723.GR9907@pengutronix.de> (raw)
In-Reply-To: <20110531052032.GA32080@S2100-06.ap.freescale.net>

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 <u.kleine-koenig@pengutronix.de>
> > ---
> >  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?)

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);
 }
 
Hhhhm, I was pretty sure I build tested that patch, it seems I did not.

Thanks Shawn for noticing.

Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

  reply	other threads:[~2011-05-31  6:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-28 19:05 [PATCH 1/3] ARM: imx: convert to new leds-gpio registration helper Uwe Kleine-König
2011-05-28 19:05 ` [PATCH 2/3] ARM: mx5: " Uwe Kleine-König
2011-05-31  3:00   ` Shawn Guo
2011-05-31  5:20   ` Shawn Guo
2011-05-31  6:37     ` Uwe Kleine-König [this message]
2011-05-28 19:05 ` [PATCH 3/3] ARM: mxs/tx28: " Uwe Kleine-König
2011-05-31  6:09   ` Shawn Guo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110531063723.GR9907@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).