Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754693AbdLTIsf (ORCPT ); Wed, 20 Dec 2017 03:48:35 -0500 Received: from mail-it0-f67.google.com ([209.85.214.67]:36158 "EHLO mail-it0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754564AbdLTIs2 (ORCPT ); Wed, 20 Dec 2017 03:48:28 -0500 X-Google-Smtp-Source: ACJfBouoEOInT4Lip7SWMjIOvrT8u4LSjHPBZ1QNWV1lsj6+IYyf5WPNujg/GWC1KthWaPg5jLfkJQ== 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 02/11] MIPS: AR7: constify gpio_led Date: Wed, 20 Dec 2017 14:17:43 +0530 Message-Id: <499819618cc9b61936f7a39f7a0f609b04812154.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: 2350 Lines: 76 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/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..343a897 100644 --- a/arch/mips/ar7/platform.c +++ b/arch/mips/ar7/platform.c @@ -346,7 +346,7 @@ static void __init cpmac_get_mac(int instance, unsigned char *dev_addr) /***************************************************************************** * LEDs ****************************************************************************/ -static struct gpio_led default_leds[] = { +static const struct gpio_led default_leds[] __initconst = { { .name = "status", .gpio = 8, @@ -354,12 +354,12 @@ static void __init cpmac_get_mac(int instance, unsigned char *dev_addr) }, }; -static struct gpio_led titan_leds[] = { +static const struct gpio_led titan_leds[] __initconst = { { .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[] __initconst = { { .name = "status", .gpio = 9, @@ -377,7 +377,7 @@ static void __init cpmac_get_mac(int instance, unsigned char *dev_addr) }, }; -static struct gpio_led dg834g_leds[] = { +static const struct gpio_led dg834g_leds[] __initconst = { { .name = "ppp", .gpio = 6, @@ -406,7 +406,7 @@ static void __init cpmac_get_mac(int instance, unsigned char *dev_addr) }, }; -static struct gpio_led fb_sl_leds[] = { +static const struct gpio_led fb_sl_leds[] __initconst = { { .name = "1", .gpio = 7, @@ -433,7 +433,7 @@ static void __init cpmac_get_mac(int instance, unsigned char *dev_addr) }, }; -static struct gpio_led fb_fon_leds[] = { +static const struct gpio_led fb_fon_leds[] __initconst = { { .name = "1", .gpio = 8, @@ -459,7 +459,7 @@ static void __init cpmac_get_mac(int instance, unsigned char *dev_addr) }, }; -static struct gpio_led gt701_leds[] = { +static const struct gpio_led gt701_leds[] __initconst = { { .name = "inet:green", .gpio = 13, -- 1.9.1