Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754840AbdLTIt3 (ORCPT ); Wed, 20 Dec 2017 03:49:29 -0500 Received: from mail-it0-f67.google.com ([209.85.214.67]:38423 "EHLO mail-it0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754641AbdLTItX (ORCPT ); Wed, 20 Dec 2017 03:49:23 -0500 X-Google-Smtp-Source: ACJfBouFbFHZP4esXlrN5QB+C2fzbsaSqB2hFaOyn0o5laqblFlPCuQcsVuSQyPMKY2WFS3aXSTskw== From: Arvind Yadav 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 09/11] ARM: orion5x: constify gpio_led Date: Wed, 20 Dec 2017 14:17:50 +0530 Message-Id: <18c50054503e6c399a8d41d2dc8ab3658d184044.1513756005.git.arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4428 Lines: 123 gpio_led are not supposed to change at runtime. struct gpio_led_platform_data working with const gpio_led provided by . So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- arch/arm/mach-orion5x/board-d2net.c | 2 +- arch/arm/mach-orion5x/dns323-setup.c | 2 +- arch/arm/mach-orion5x/ls_hgl-setup.c | 2 +- arch/arm/mach-orion5x/mv2120-setup.c | 2 +- arch/arm/mach-orion5x/net2big-setup.c | 2 +- arch/arm/mach-orion5x/rd88f5182-setup.c | 2 +- arch/arm/mach-orion5x/ts409-setup.c | 2 +- arch/arm/mach-orion5x/wrt350n-v2-setup.c | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/arch/arm/mach-orion5x/board-d2net.c b/arch/arm/mach-orion5x/board-d2net.c index a89376a..8791a22 100644 --- a/arch/arm/mach-orion5x/board-d2net.c +++ b/arch/arm/mach-orion5x/board-d2net.c @@ -54,7 +54,7 @@ #define D2NET_GPIO_BLUE_LED_BLINK_CTRL 16 #define D2NET_GPIO_BLUE_LED_OFF 23 -static struct gpio_led d2net_leds[] = { +static const struct gpio_led d2net_leds[] __initconst = { { .name = "d2net:blue:sata", .default_trigger = "default-on", diff --git a/arch/arm/mach-orion5x/dns323-setup.c b/arch/arm/mach-orion5x/dns323-setup.c index cd483bf..70eb340 100644 --- a/arch/arm/mach-orion5x/dns323-setup.c +++ b/arch/arm/mach-orion5x/dns323-setup.c @@ -221,7 +221,7 @@ static int __init dns323_read_mac_addr(void) }; -static struct gpio_led dns323c_leds[] = { +static const struct gpio_led dns323c_leds[] __initconst = { { .name = "power:blue", .gpio = DNS323C_GPIO_LED_POWER, diff --git a/arch/arm/mach-orion5x/ls_hgl-setup.c b/arch/arm/mach-orion5x/ls_hgl-setup.c index 47ba6e0..f5410e0 100644 --- a/arch/arm/mach-orion5x/ls_hgl-setup.c +++ b/arch/arm/mach-orion5x/ls_hgl-setup.c @@ -86,7 +86,7 @@ #define LS_HGL_GPIO_LED_PWR 0 -static struct gpio_led ls_hgl_led_pins[] = { +static const struct gpio_led ls_hgl_led_pins[] __initconst = { { .name = "alarm:red", .gpio = LS_HGL_GPIO_LED_ALARM, diff --git a/arch/arm/mach-orion5x/mv2120-setup.c b/arch/arm/mach-orion5x/mv2120-setup.c index 2bf8ec7..957095a 100644 --- a/arch/arm/mach-orion5x/mv2120-setup.c +++ b/arch/arm/mach-orion5x/mv2120-setup.c @@ -136,7 +136,7 @@ .irq = 0, }; -static struct gpio_led mv2120_led_pins[] = { +static const struct gpio_led mv2120_led_pins[] __initconst = { { .name = "mv2120:blue:health", .gpio = 0, diff --git a/arch/arm/mach-orion5x/net2big-setup.c b/arch/arm/mach-orion5x/net2big-setup.c index bf6be4c..f8ca382 100644 --- a/arch/arm/mach-orion5x/net2big-setup.c +++ b/arch/arm/mach-orion5x/net2big-setup.c @@ -214,7 +214,7 @@ static void __init net2big_sata_power_init(void) #define NET2BIG_GPIO_SATA0_BLUE_LED 17 #define NET2BIG_GPIO_SATA1_BLUE_LED 13 -static struct gpio_led net2big_leds[] = { +static const struct gpio_led net2big_leds[] __initconst = { { .name = "net2big:red:power", .gpio = NET2BIG_GPIO_PWR_RED_LED, diff --git a/arch/arm/mach-orion5x/rd88f5182-setup.c b/arch/arm/mach-orion5x/rd88f5182-setup.c index fe3e67c..6376ae1 100644 --- a/arch/arm/mach-orion5x/rd88f5182-setup.c +++ b/arch/arm/mach-orion5x/rd88f5182-setup.c @@ -83,7 +83,7 @@ #define RD88F5182_GPIO_LED 0 -static struct gpio_led rd88f5182_gpio_led_pins[] = { +static const struct gpio_led rd88f5182_gpio_led_pins[] __initconst = { { .name = "rd88f5182:cpu", .default_trigger = "cpu0", diff --git a/arch/arm/mach-orion5x/ts409-setup.c b/arch/arm/mach-orion5x/ts409-setup.c index a77613b..6d88d2f 100644 --- a/arch/arm/mach-orion5x/ts409-setup.c +++ b/arch/arm/mach-orion5x/ts409-setup.c @@ -169,7 +169,7 @@ static int __init qnap_ts409_pci_init(void) * LEDs attached to GPIO ****************************************************************************/ -static struct gpio_led ts409_led_pins[] = { +static const struct gpio_led ts409_led_pins[] __initconst = { { .name = "ts409:red:sata1", .gpio = 4, diff --git a/arch/arm/mach-orion5x/wrt350n-v2-setup.c b/arch/arm/mach-orion5x/wrt350n-v2-setup.c index 9250bb2..40adfd8 100644 --- a/arch/arm/mach-orion5x/wrt350n-v2-setup.c +++ b/arch/arm/mach-orion5x/wrt350n-v2-setup.c @@ -29,7 +29,7 @@ /* * LEDs attached to GPIO */ -static struct gpio_led wrt350n_v2_led_pins[] = { +static const struct gpio_led wrt350n_v2_led_pins[] __initconst = { { .name = "wrt350nv2:green:power", .gpio = 0, -- 1.9.1