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 11/11] ARM: pxa: constify gpio_led
Date: Wed, 20 Dec 2017 14:17:52 +0530	[thread overview]
Message-ID: <6cd4fa3a594e5aae6e6a4d9cf8f7ba96e18c6c61.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-pxa/balloon3.c  | 4 ++--
 arch/arm/mach-pxa/corgi.c     | 2 +-
 arch/arm/mach-pxa/csb701.c    | 2 +-
 arch/arm/mach-pxa/magician.c  | 2 +-
 arch/arm/mach-pxa/mioa701.c   | 2 +-
 arch/arm/mach-pxa/palmld.c    | 2 +-
 arch/arm/mach-pxa/palmz72.c   | 2 +-
 arch/arm/mach-pxa/pcm027.c    | 2 +-
 arch/arm/mach-pxa/raumfeld.c  | 4 ++--
 arch/arm/mach-pxa/spitz.c     | 2 +-
 arch/arm/mach-pxa/stargate2.c | 2 +-
 arch/arm/mach-pxa/tosa.c      | 2 +-
 arch/arm/mach-pxa/trizeps4.c  | 2 +-
 arch/arm/mach-pxa/zeus.c      | 2 +-
 14 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/arch/arm/mach-pxa/balloon3.c b/arch/arm/mach-pxa/balloon3.c
index d6d92f3..4413829 100644
--- a/arch/arm/mach-pxa/balloon3.c
+++ b/arch/arm/mach-pxa/balloon3.c
@@ -387,7 +387,7 @@ static inline void balloon3_uhc_init(void) {}
 	GPIO10_GPIO,	/* Heartbeat LED */
 };
 
-struct gpio_led balloon3_gpio_leds[] = {
+struct const gpio_led balloon3_gpio_leds[] __initconst = {
 	{
 		.name			= "balloon3:green:idle",
 		.default_trigger	= "heartbeat",
@@ -414,7 +414,7 @@ struct gpio_led balloon3_gpio_leds[] = {
 	}
 };
 
-struct gpio_led balloon3_pcf_gpio_leds[] = {
+const struct gpio_led balloon3_pcf_gpio_leds[] __initconst = {
 	{
 		.name			= "balloon3:green:led0",
 		.gpio			= BALLOON3_PCF_GPIO_LED0,
diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c
index 7270f0db..b0e0d3b 100644
--- a/arch/arm/mach-pxa/corgi.c
+++ b/arch/arm/mach-pxa/corgi.c
@@ -450,7 +450,7 @@ struct platform_device corgiscoop_device = {
 /*
  * Corgi LEDs
  */
-static struct gpio_led corgi_gpio_leds[] = {
+static const struct gpio_led corgi_gpio_leds[] __initconst = {
 	{
 		.name			= "corgi:amber:charge",
 		.default_trigger	= "sharpsl-charge",
diff --git a/arch/arm/mach-pxa/csb701.c b/arch/arm/mach-pxa/csb701.c
index 527c9fd..ff52892 100644
--- a/arch/arm/mach-pxa/csb701.c
+++ b/arch/arm/mach-pxa/csb701.c
@@ -24,7 +24,7 @@
 	.nbuttons = ARRAY_SIZE(csb701_buttons),
 };
 
-static struct gpio_led csb701_leds[] = {
+static const struct gpio_led csb701_leds[] __initconst = {
 	{
 		.name	= "csb701:yellow:heartbeat",
 		.default_trigger = "heartbeat",
diff --git a/arch/arm/mach-pxa/magician.c b/arch/arm/mach-pxa/magician.c
index 7f3566c..505d1e3 100644
--- a/arch/arm/mach-pxa/magician.c
+++ b/arch/arm/mach-pxa/magician.c
@@ -424,7 +424,7 @@ static void magician_backlight_exit(struct device *dev)
  * GPIO LEDs, Phone keys backlight, vibra
  */
 
-static struct gpio_led gpio_leds[] = {
+static const struct gpio_led gpio_leds[] __initconst = {
 	{
 		.name = "magician::vibra",
 		.default_trigger = "none",
diff --git a/arch/arm/mach-pxa/mioa701.c b/arch/arm/mach-pxa/mioa701.c
index 8a5d049..e3d2248 100644
--- a/arch/arm/mach-pxa/mioa701.c
+++ b/arch/arm/mach-pxa/mioa701.c
@@ -274,7 +274,7 @@ static void mioa701_lcd_power(int on, struct fb_var_screeninfo *si)
  */
 #define ONE_LED(_gpio, _name) \
 { .gpio = (_gpio), .name = (_name), .active_low = true }
-static struct gpio_led gpio_leds[] = {
+static const struct gpio_led gpio_leds[] __initconst = {
 	ONE_LED(GPIO10_LED_nCharging, "mioa701:charging"),
 	ONE_LED(GPIO97_LED_nBlue, "mioa701:blue"),
 	ONE_LED(GPIO98_LED_nOrange, "mioa701:orange"),
diff --git a/arch/arm/mach-pxa/palmld.c b/arch/arm/mach-pxa/palmld.c
index 980f284..37239f4 100644
--- a/arch/arm/mach-pxa/palmld.c
+++ b/arch/arm/mach-pxa/palmld.c
@@ -246,7 +246,7 @@ static inline void palmld_keys_init(void) {}
  * LEDs
  ******************************************************************************/
 #if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
-struct gpio_led gpio_leds[] = {
+struct const gpio_led gpio_leds[] __initconst = {
 {
 	.name			= "palmld:green:led",
 	.default_trigger	= "none",
diff --git a/arch/arm/mach-pxa/palmz72.c b/arch/arm/mach-pxa/palmz72.c
index 5877e54..acacadb 100644
--- a/arch/arm/mach-pxa/palmz72.c
+++ b/arch/arm/mach-pxa/palmz72.c
@@ -182,7 +182,7 @@ static inline void palmz72_kpc_init(void) {}
  * LEDs
  ******************************************************************************/
 #if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
-static struct gpio_led gpio_leds[] = {
+static const struct gpio_led gpio_leds[] __initconst = {
 	{
 		.name			= "palmz72:green:led",
 		.default_trigger	= "none",
diff --git a/arch/arm/mach-pxa/pcm027.c b/arch/arm/mach-pxa/pcm027.c
index ccca9f7..face4c8 100644
--- a/arch/arm/mach-pxa/pcm027.c
+++ b/arch/arm/mach-pxa/pcm027.c
@@ -177,7 +177,7 @@
 
 #ifdef CONFIG_LEDS_GPIO
 
-static struct gpio_led pcm027_led[] = {
+static const struct gpio_led pcm027_led[] __initconst = {
 	{
 		.name = "led0:red",	/* FIXME */
 		.gpio = PCM027_LED_CPU
diff --git a/arch/arm/mach-pxa/raumfeld.c b/arch/arm/mach-pxa/raumfeld.c
index 9d662fe..633c74d 100644
--- a/arch/arm/mach-pxa/raumfeld.c
+++ b/arch/arm/mach-pxa/raumfeld.c
@@ -468,7 +468,7 @@
  * GPIO LEDs
  */
 
-static struct gpio_led raumfeld_leds[] = {
+static const struct gpio_led raumfeld_leds[] __initconst = {
 	{
 		.name		= "raumfeld:1",
 		.gpio		= GPIO_LED1,
@@ -558,7 +558,7 @@ static void __init raumfeld_w1_init(void)
 };
 
 /* LT3593 controlled backlight */
-static struct gpio_led raumfeld_lt3593_led = {
+static const struct gpio_led raumfeld_lt3593_led __initconst = {
 	.name		= "backlight",
 	.gpio		= mfp_to_gpio(MFP_PIN_GPIO17),
 	.default_state	= LEDS_GPIO_DEFSTATE_ON,
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c
index 67d66c7..d24be35 100644
--- a/arch/arm/mach-pxa/spitz.c
+++ b/arch/arm/mach-pxa/spitz.c
@@ -456,7 +456,7 @@ static inline void spitz_keys_init(void) {}
  * LEDs
  ******************************************************************************/
 #if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
-static struct gpio_led spitz_gpio_leds[] = {
+static const struct gpio_led spitz_gpio_leds[] __initconst = {
 	{
 		.name			= "spitz:amber:charge",
 		.default_trigger	= "sharpsl-charge",
diff --git a/arch/arm/mach-pxa/stargate2.c b/arch/arm/mach-pxa/stargate2.c
index 6b7df6f..3704d6c 100644
--- a/arch/arm/mach-pxa/stargate2.c
+++ b/arch/arm/mach-pxa/stargate2.c
@@ -441,7 +441,7 @@ static int imote2_mci_get_ro(struct device *dev)
 	.gpio_power = -1,
 };
 
-static struct gpio_led imote2_led_pins[] = {
+static const struct gpio_led imote2_led_pins[] __initconst = {
 	{
 		.name       =  "imote2:red",
 		.gpio       = 103,
diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c
index 6a386fd..d306b96 100644
--- a/arch/arm/mach-pxa/tosa.c
+++ b/arch/arm/mach-pxa/tosa.c
@@ -548,7 +548,7 @@ static void tosa_irda_shutdown(struct device *dev)
 /*
  * Tosa LEDs
  */
-static struct gpio_led tosa_gpio_leds[] = {
+static const struct gpio_led tosa_gpio_leds[] __initconst = {
 	{
 		.name			= "tosa:amber:charge",
 		.default_trigger	= "main-battery-charging",
diff --git a/arch/arm/mach-pxa/trizeps4.c b/arch/arm/mach-pxa/trizeps4.c
index 3dd13b4..4f95c03 100644
--- a/arch/arm/mach-pxa/trizeps4.c
+++ b/arch/arm/mach-pxa/trizeps4.c
@@ -235,7 +235,7 @@
 /****************************************************************************
  * LED's on GPIO pins of PXA
  ****************************************************************************/
-static struct gpio_led trizeps4_led[] = {
+static const struct gpio_led trizeps4_led[] __initconst = {
 #ifdef STATUS_LEDS_ON_STUART_PINS
 	{
 		.name = "led0:orange:heartbeat",	/* */
diff --git a/arch/arm/mach-pxa/zeus.c b/arch/arm/mach-pxa/zeus.c
index ecbcaee..8ceafd7 100644
--- a/arch/arm/mach-pxa/zeus.c
+++ b/arch/arm/mach-pxa/zeus.c
@@ -438,7 +438,7 @@ static void __init zeus_init_irq(void)
 };
 
 /* Leds */
-static struct gpio_led zeus_leds[] = {
+static const struct gpio_led zeus_leds[] __initconst = {
 	[0] = {
 		.name		 = "zeus:yellow:1",
 		.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 ` [PATCH 08/11] ARM: OMAP1: " Arvind Yadav
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 ` Arvind Yadav [this message]
2017-12-24 17:54   ` [PATCH 11/11] ARM: pxa: " 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=6cd4fa3a594e5aae6e6a4d9cf8f7ba96e18c6c61.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.