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, 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-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 02/11 v2] MIPS: AR7: constify gpio_led
Date: Tue, 26 Dec 2017 12:03:09 +0530 [thread overview]
Message-ID: <99868e4babfb2d550f94c8e8d604f41b577c864d.1514267721.git.arvind.yadav.cs@gmail.com> (raw)
In-Reply-To: <de0879ef47b96776e3f18a1889c41d976a677b21.1514267721.git.arvind.yadav.cs@gmail.com>
In-Reply-To: <de0879ef47b96776e3f18a1889c41d976a677b21.1514267721.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>
---
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'.
arch/mips/ar7/platform.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/arch/mips/ar7/platform.c b/arch/mips/ar7/platform.c
index 4674f1e..4694273 100644
--- a/arch/mips/ar7/platform.c
+++ b/arch/mips/ar7/platform.c
@@ -346,7 +346,7 @@ static struct platform_device ar7_udc = {
/*****************************************************************************
* LEDs
****************************************************************************/
-static struct gpio_led default_leds[] = {
+static const struct gpio_led default_leds[] = {
{
.name = "status",
.gpio = 8,
@@ -354,12 +354,12 @@ static struct gpio_led default_leds[] = {
},
};
-static struct gpio_led titan_leds[] = {
+static const struct gpio_led titan_leds[] = {
{ .name = "status", .gpio = 8, .active_low = 1, },
{ .name = "wifi", .gpio = 13, .active_low = 1, },
};
-static struct gpio_led dsl502t_leds[] = {
+static const struct gpio_led dsl502t_leds[] = {
{
.name = "status",
.gpio = 9,
@@ -377,7 +377,7 @@ static struct gpio_led dsl502t_leds[] = {
},
};
-static struct gpio_led dg834g_leds[] = {
+static const struct gpio_led dg834g_leds[] = {
{
.name = "ppp",
.gpio = 6,
@@ -406,7 +406,7 @@ static struct gpio_led dg834g_leds[] = {
},
};
-static struct gpio_led fb_sl_leds[] = {
+static const struct gpio_led fb_sl_leds[] = {
{
.name = "1",
.gpio = 7,
@@ -433,7 +433,7 @@ static struct gpio_led fb_sl_leds[] = {
},
};
-static struct gpio_led fb_fon_leds[] = {
+static const struct gpio_led fb_fon_leds[] = {
{
.name = "1",
.gpio = 8,
@@ -459,7 +459,7 @@ static struct gpio_led fb_fon_leds[] = {
},
};
-static struct gpio_led gt701_leds[] = {
+static const struct gpio_led gt701_leds[] = {
{
.name = "inet:green",
.gpio = 13,
--
2.7.4
next prev parent reply other threads:[~2017-12-26 6:33 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-26 6:33 [PATCH 01/11 v2] MIPS: Alchemy: " Arvind Yadav
2017-12-26 6:33 ` Arvind Yadav [this message]
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:37 ` [PATCH 06/11 v2] ARM: davinci: " Arvind Yadav
2017-12-26 6:37 ` [PATCH 07/11 v2] ARM: ixp4xx: " Arvind Yadav
2017-12-26 6:37 ` [PATCH 08/11 v2] ARM: OMAP1: " Arvind Yadav
2018-01-09 17:32 ` Aaro Koskinen
2018-07-02 11:16 ` Tony Lindgren
2017-12-26 6:37 ` [PATCH 09/11 v2] ARM: orion5x: " Arvind Yadav
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 17:42 ` Krzysztof Kozlowski
2017-12-26 18:40 ` arvindY
2017-12-27 8:19 ` [PATCH 10/11 v3] " Krzysztof Kozlowski
2017-12-27 11:03 ` arvindY
2017-12-26 6:37 ` [PATCH 11/11 v2] ARM: pxa: " 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=99868e4babfb2d550f94c8e8d604f41b577c864d.1514267721.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-mips@linux-mips.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=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®