All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arvind Yadav <arvind.yadav.cs@gmail.com>
To: nsekhar@ti.com, khilman@kernel.org, linux@armlinux.org.uk,
	kaloz@openwrt.org, khalasa@piap.pl, aaro.koskinen@iki.fi,
	tony@atomide.com, jason@lakedaemon.net, andrew@lunn.ch,
	sebastian.hesselbarth@gmail.com,
	gregory.clement@free-electrons.com, daniel@zonque.org,
	haojian.zhuang@gmail.com, robert.jarzmik@free.fr,
	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
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 08/11] ARM: OMAP1: constify gpio_led
Date: Wed, 20 Dec 2017 14:17:49 +0530	[thread overview]
Message-ID: <e7a339613a40b3d900df181f1bda3fbc0ad300b0.1513756005.git.arvind.yadav.cs@gmail.com> (raw)
In-Reply-To: <cover.1513756005.git.arvind.yadav.cs@gmail.com>
In-Reply-To: <cover.1513756005.git.arvind.yadav.cs@gmail.com>

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>
---
 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..43f95e5 100644
--- a/arch/arm/mach-omap1/board-h2.c
+++ b/arch/arm/mach-omap1/board-h2.c
@@ -274,7 +274,7 @@ static int h2_nand_dev_ready(struct mtd_info *mtd)
 	.resource	= h2_kp_resources,
 };
 
-static struct gpio_led h2_gpio_led_pins[] = {
+static const struct gpio_led h2_gpio_led_pins[] __initconst = {
 	{
 		.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..957edb5 100644
--- a/arch/arm/mach-omap1/board-h3.c
+++ b/arch/arm/mach-omap1/board-h3.c
@@ -326,7 +326,7 @@ static void __init h3_init_smc91x(void)
 	},
 };
 
-static struct gpio_led h3_gpio_led_pins[] = {
+static const struct gpio_led h3_gpio_led_pins[] __initconst = {
 	{
 		.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..627b5e3 100644
--- a/arch/arm/mach-omap1/board-htcherald.c
+++ b/arch/arm/mach-omap1/board-htcherald.c
@@ -292,7 +292,7 @@
 };
 
 /* LEDs for the Herald.  These connect to the HTCPLD GPIO device. */
-static struct gpio_led gpio_leds[] = {
+static const struct gpio_led gpio_leds[] __initconst = {
 	{"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..4216b50 100644
--- a/arch/arm/mach-omap1/board-osk.c
+++ b/arch/arm/mach-omap1/board-osk.c
@@ -167,7 +167,7 @@
 	&osk5912_cf_device,
 };
 
-static struct gpio_led tps_leds[] = {
+static const struct gpio_led tps_leds[] __initconst = {
 	/* NOTE:  D9 and D2 have hardware blink support.
 	 * Also, D9 requires non-battery power.
 	 */
@@ -385,7 +385,7 @@ static void __init osk_init_cf(void)
 	.id		= -1,
 };
 
-static struct gpio_led mistral_gpio_led_pins[] = {
+static const struct gpio_led mistral_gpio_led_pins[] __initconst = {
 	{
 		.name		= "mistral:red",
 		.default_trigger = "heartbeat",
-- 
1.9.1

  parent reply	other threads:[~2017-12-20  8:49 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-20  8:47 [PATCH 00/11] constify gpio_led Arvind Yadav
2017-12-20  8:47 ` [PATCH 01/11] MIPS: Alchemy: " Arvind Yadav
2017-12-20  8:47 ` [PATCH 02/11] MIPS: AR7: " Arvind Yadav
2017-12-20  8:47 ` [PATCH 03/11] MIPS: TXX9: " Arvind Yadav
2017-12-20  8:47 ` [PATCH 04/11] x86: geode: " Arvind Yadav
2017-12-23  7:50   ` kbuild test robot
2017-12-20  8:47 ` [PATCH 05/11] sh: mach-rsk: rsk7203: " Arvind Yadav
2017-12-20  8:47 ` [PATCH 06/11] ARM: davinci: " Arvind Yadav
2017-12-23 10:01   ` Sekhar Nori
2017-12-20  8:47 ` [PATCH 07/11] ARM: ixp4xx: " Arvind Yadav
2017-12-20  8:47 ` Arvind Yadav [this message]
2017-12-20  8:47 ` [PATCH 09/11] ARM: orion5x: " Arvind Yadav
2017-12-20  8:47 ` [PATCH 10/11] ARM: s3c24xx: " Arvind Yadav
2017-12-20  8:47 ` [PATCH 11/11] ARM: pxa: " Arvind Yadav
2017-12-24 17:54   ` kbuild test robot
2017-12-25 13:04     ` arvindY
2017-12-23 10:13 ` [PATCH 00/11] " Russell King - ARM Linux
2017-12-25 13:07   ` arvindY

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=e7a339613a40b3d900df181f1bda3fbc0ad300b0.1513756005.git.arvind.yadav.cs@gmail.com \
    --to=arvind.yadav.cs@gmail.com \
    --cc=aaro.koskinen@iki.fi \
    --cc=andrew@lunn.ch \
    --cc=dalias@libc.org \
    --cc=daniel@zonque.org \
    --cc=gregory.clement@free-electrons.com \
    --cc=haojian.zhuang@gmail.com \
    --cc=hpa@zytor.com \
    --cc=jason@lakedaemon.net \
    --cc=jic23@cam.ac.uk \
    --cc=kaloz@openwrt.org \
    --cc=kgene@kernel.org \
    --cc=khalasa@piap.pl \
    --cc=khilman@kernel.org \
    --cc=krzk@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=marek.vasut@gmail.com \
    --cc=mingo@redhat.com \
    --cc=nsekhar@ti.com \
    --cc=ralf@linux-mips.org \
    --cc=robert.jarzmik@free.fr \
    --cc=sebastian.hesselbarth@gmail.com \
    --cc=slapin@ossfans.org \
    --cc=tglx@linutronix.de \
    --cc=tony@atomide.com \
    --cc=ysato@users.sourceforge.jp \
    /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.