From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 08/11 v2] ARM: OMAP1: constify gpio_led
Date: Mon, 2 Jul 2018 04:16:05 -0700 [thread overview]
Message-ID: <20180702111605.GS112168@atomide.com> (raw)
In-Reply-To: <c00efa8371f63d6b888590ea66767c832088cd1a.1514267721.git.arvind.yadav.cs@gmail.com>
* Arvind Yadav <arvind.yadav.cs@gmail.com> [171225 22:40]:
> gpio_led are not supposed to change at runtime.
> struct gpio_led_platform_data working with const gpio_led
> provided by <linux/leds.h>. So mark the non-const structs
> as const.
>
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
> ---
> changes in v2:
> The GPIO LED driver can be built as a module, it can
> be loaded after the init sections have gone away.
> So removed '__initconst'.
Sorry just noticed I still have this one tagged and it's still
pending.. Applying into omap-for-v4.19/omap1.
Regards,
Tony
> arch/arm/mach-omap1/board-h2.c | 2 +-
> arch/arm/mach-omap1/board-h3.c | 2 +-
> arch/arm/mach-omap1/board-htcherald.c | 2 +-
> arch/arm/mach-omap1/board-osk.c | 4 ++--
> 4 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c
> index ab51f85..9aeb8ad 100644
> --- a/arch/arm/mach-omap1/board-h2.c
> +++ b/arch/arm/mach-omap1/board-h2.c
> @@ -274,7 +274,7 @@ static struct platform_device h2_kp_device = {
> .resource = h2_kp_resources,
> };
>
> -static struct gpio_led h2_gpio_led_pins[] = {
> +static const struct gpio_led h2_gpio_led_pins[] = {
> {
> .name = "h2:red",
> .default_trigger = "heartbeat",
> diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c
> index ad339f5..2edcd63 100644
> --- a/arch/arm/mach-omap1/board-h3.c
> +++ b/arch/arm/mach-omap1/board-h3.c
> @@ -326,7 +326,7 @@ static struct spi_board_info h3_spi_board_info[] __initdata = {
> },
> };
>
> -static struct gpio_led h3_gpio_led_pins[] = {
> +static const struct gpio_led h3_gpio_led_pins[] = {
> {
> .name = "h3:red",
> .default_trigger = "heartbeat",
> diff --git a/arch/arm/mach-omap1/board-htcherald.c b/arch/arm/mach-omap1/board-htcherald.c
> index 67d4669..e6a79fd 100644
> --- a/arch/arm/mach-omap1/board-htcherald.c
> +++ b/arch/arm/mach-omap1/board-htcherald.c
> @@ -292,7 +292,7 @@ static struct platform_device herald_gpiokeys_device = {
> };
>
> /* LEDs for the Herald. These connect to the HTCPLD GPIO device. */
> -static struct gpio_led gpio_leds[] = {
> +static const struct gpio_led gpio_leds[] = {
> {"dpad", NULL, HTCPLD_GPIO_LED_DPAD, 0, 0, LEDS_GPIO_DEFSTATE_OFF},
> {"kbd", NULL, HTCPLD_GPIO_LED_KBD, 0, 0, LEDS_GPIO_DEFSTATE_OFF},
> {"vibrate", NULL, HTCPLD_GPIO_LED_VIBRATE, 0, 0, LEDS_GPIO_DEFSTATE_OFF},
> diff --git a/arch/arm/mach-omap1/board-osk.c b/arch/arm/mach-omap1/board-osk.c
> index c66372e..e2277b5 100644
> --- a/arch/arm/mach-omap1/board-osk.c
> +++ b/arch/arm/mach-omap1/board-osk.c
> @@ -167,7 +167,7 @@ static struct platform_device *osk5912_devices[] __initdata = {
> &osk5912_cf_device,
> };
>
> -static struct gpio_led tps_leds[] = {
> +static const struct gpio_led tps_leds[] = {
> /* NOTE: D9 and D2 have hardware blink support.
> * Also, D9 requires non-battery power.
> */
> @@ -385,7 +385,7 @@ static struct platform_device osk5912_lcd_device = {
> .id = -1,
> };
>
> -static struct gpio_led mistral_gpio_led_pins[] = {
> +static const struct gpio_led mistral_gpio_led_pins[] = {
> {
> .name = "mistral:red",
> .default_trigger = "heartbeat",
> --
> 2.7.4
>
WARNING: multiple messages have this Message-ID (diff)
From: Tony Lindgren <tony@atomide.com>
To: Arvind Yadav <arvind.yadav.cs@gmail.com>
Cc: nsekhar@ti.com, khilman@kernel.org, linux@armlinux.org.uk,
kaloz@openwrt.org, khalasa@piap.pl, aaro.koskinen@iki.fi,
jason@lakedaemon.net, andrew@lunn.ch,
sebastian.hesselbarth@gmail.com,
gregory.clement@free-electrons.com, daniel@zonque.org,
haojian.zhuang@gmail.com, marek.vasut@gmail.com,
slapin@ossfans.org, jic23@cam.ac.uk, kgene@kernel.org,
krzk@kernel.org, ralf@linux-mips.org, ysato@users.sourceforge.jp,
dalias@libc.org, tglx@linutronix.de, mingo@redhat.com,
hpa@zytor.com, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 08/11 v2] ARM: OMAP1: constify gpio_led
Date: Mon, 2 Jul 2018 04:16:05 -0700 [thread overview]
Message-ID: <20180702111605.GS112168@atomide.com> (raw)
In-Reply-To: <c00efa8371f63d6b888590ea66767c832088cd1a.1514267721.git.arvind.yadav.cs@gmail.com>
* Arvind Yadav <arvind.yadav.cs@gmail.com> [171225 22:40]:
> gpio_led are not supposed to change at runtime.
> struct gpio_led_platform_data working with const gpio_led
> provided by <linux/leds.h>. So mark the non-const structs
> as const.
>
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
> ---
> changes in v2:
> The GPIO LED driver can be built as a module, it can
> be loaded after the init sections have gone away.
> So removed '__initconst'.
Sorry just noticed I still have this one tagged and it's still
pending.. Applying into omap-for-v4.19/omap1.
Regards,
Tony
> arch/arm/mach-omap1/board-h2.c | 2 +-
> arch/arm/mach-omap1/board-h3.c | 2 +-
> arch/arm/mach-omap1/board-htcherald.c | 2 +-
> arch/arm/mach-omap1/board-osk.c | 4 ++--
> 4 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c
> index ab51f85..9aeb8ad 100644
> --- a/arch/arm/mach-omap1/board-h2.c
> +++ b/arch/arm/mach-omap1/board-h2.c
> @@ -274,7 +274,7 @@ static struct platform_device h2_kp_device = {
> .resource = h2_kp_resources,
> };
>
> -static struct gpio_led h2_gpio_led_pins[] = {
> +static const struct gpio_led h2_gpio_led_pins[] = {
> {
> .name = "h2:red",
> .default_trigger = "heartbeat",
> diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c
> index ad339f5..2edcd63 100644
> --- a/arch/arm/mach-omap1/board-h3.c
> +++ b/arch/arm/mach-omap1/board-h3.c
> @@ -326,7 +326,7 @@ static struct spi_board_info h3_spi_board_info[] __initdata = {
> },
> };
>
> -static struct gpio_led h3_gpio_led_pins[] = {
> +static const struct gpio_led h3_gpio_led_pins[] = {
> {
> .name = "h3:red",
> .default_trigger = "heartbeat",
> diff --git a/arch/arm/mach-omap1/board-htcherald.c b/arch/arm/mach-omap1/board-htcherald.c
> index 67d4669..e6a79fd 100644
> --- a/arch/arm/mach-omap1/board-htcherald.c
> +++ b/arch/arm/mach-omap1/board-htcherald.c
> @@ -292,7 +292,7 @@ static struct platform_device herald_gpiokeys_device = {
> };
>
> /* LEDs for the Herald. These connect to the HTCPLD GPIO device. */
> -static struct gpio_led gpio_leds[] = {
> +static const struct gpio_led gpio_leds[] = {
> {"dpad", NULL, HTCPLD_GPIO_LED_DPAD, 0, 0, LEDS_GPIO_DEFSTATE_OFF},
> {"kbd", NULL, HTCPLD_GPIO_LED_KBD, 0, 0, LEDS_GPIO_DEFSTATE_OFF},
> {"vibrate", NULL, HTCPLD_GPIO_LED_VIBRATE, 0, 0, LEDS_GPIO_DEFSTATE_OFF},
> diff --git a/arch/arm/mach-omap1/board-osk.c b/arch/arm/mach-omap1/board-osk.c
> index c66372e..e2277b5 100644
> --- a/arch/arm/mach-omap1/board-osk.c
> +++ b/arch/arm/mach-omap1/board-osk.c
> @@ -167,7 +167,7 @@ static struct platform_device *osk5912_devices[] __initdata = {
> &osk5912_cf_device,
> };
>
> -static struct gpio_led tps_leds[] = {
> +static const struct gpio_led tps_leds[] = {
> /* NOTE: D9 and D2 have hardware blink support.
> * Also, D9 requires non-battery power.
> */
> @@ -385,7 +385,7 @@ static struct platform_device osk5912_lcd_device = {
> .id = -1,
> };
>
> -static struct gpio_led mistral_gpio_led_pins[] = {
> +static const struct gpio_led mistral_gpio_led_pins[] = {
> {
> .name = "mistral:red",
> .default_trigger = "heartbeat",
> --
> 2.7.4
>
next prev parent reply other threads:[~2018-07-02 11:16 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-26 6:33 [PATCH 01/11 v2] MIPS: Alchemy: constify gpio_led Arvind Yadav
2017-12-26 6:33 ` [PATCH 02/11 v2] MIPS: AR7: " Arvind Yadav
2017-12-26 6:33 ` [PATCH 03/11 v2] MIPS: TXX9: " Arvind Yadav
2017-12-26 6:34 ` [PATCH 04/11 v2] x86: geode: " Arvind Yadav
2017-12-26 6:35 ` [PATCH 05/11 v2] sh: mach-rsk: rsk7203: " Arvind Yadav
2017-12-26 6:47 ` Arvind Yadav
2017-12-26 6:37 ` [PATCH 06/11 v2] ARM: davinci: " Arvind Yadav
2017-12-26 6:37 ` Arvind Yadav
2017-12-26 6:37 ` [PATCH 07/11 v2] ARM: ixp4xx: " Arvind Yadav
2017-12-26 6:37 ` Arvind Yadav
2017-12-26 6:37 ` [PATCH 08/11 v2] ARM: OMAP1: " Arvind Yadav
2017-12-26 6:37 ` Arvind Yadav
2018-01-09 17:32 ` Aaro Koskinen
2018-01-09 17:32 ` Aaro Koskinen
2018-07-02 11:16 ` Tony Lindgren [this message]
2018-07-02 11:16 ` Tony Lindgren
2017-12-26 6:37 ` [PATCH 09/11 v2] ARM: orion5x: " Arvind Yadav
2017-12-26 6:37 ` Arvind Yadav
2017-12-26 23:02 ` kbuild test robot
2017-12-26 23:02 ` kbuild test robot
2017-12-26 6:37 ` [PATCH 10/11 v2] ARM: s3c24xx/s3c64xx: " Arvind Yadav
2017-12-26 6:37 ` Arvind Yadav
2017-12-26 17:42 ` Krzysztof Kozlowski
2017-12-26 17:42 ` Krzysztof Kozlowski
2017-12-26 18:40 ` arvindY
2017-12-26 18:40 ` arvindY
2017-12-27 8:19 ` [PATCH 10/11 v3] " Krzysztof Kozlowski
2017-12-27 8:19 ` Krzysztof Kozlowski
2017-12-27 11:03 ` arvindY
2017-12-27 11:03 ` arvindY
2017-12-26 6:37 ` [PATCH 11/11 v2] ARM: pxa: " Arvind Yadav
2017-12-26 6:37 ` Arvind Yadav
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=20180702111605.GS112168@atomide.com \
--to=tony@atomide.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.