Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750801AbdLZGd1 (ORCPT ); Tue, 26 Dec 2017 01:33:27 -0500 Received: from mail-pg0-f66.google.com ([74.125.83.66]:45185 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750705AbdLZGd0 (ORCPT ); Tue, 26 Dec 2017 01:33:26 -0500 X-Google-Smtp-Source: ACJfBoufRoy+c2zUZwhRmbgub3r64rBX1eySBgtHCFizVJkgedyTy8UqgJD5sMcg+MCmvXmpF+B2oA== 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, 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 01/11 v2] MIPS: Alchemy: constify gpio_led Date: Tue, 26 Dec 2017 12:03:08 +0530 Message-Id: X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1392 Lines: 44 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 --- 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/alchemy/board-gpr.c | 2 +- arch/mips/alchemy/board-mtx1.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/mips/alchemy/board-gpr.c b/arch/mips/alchemy/board-gpr.c index 328d697..4e79dbd 100644 --- a/arch/mips/alchemy/board-gpr.c +++ b/arch/mips/alchemy/board-gpr.c @@ -190,7 +190,7 @@ static struct platform_device gpr_mtd_device = { /* * LEDs */ -static struct gpio_led gpr_gpio_leds[] = { +static const struct gpio_led gpr_gpio_leds[] = { { /* green */ .name = "gpr:green", .gpio = 4, diff --git a/arch/mips/alchemy/board-mtx1.c b/arch/mips/alchemy/board-mtx1.c index 85bb756..aab55aa 100644 --- a/arch/mips/alchemy/board-mtx1.c +++ b/arch/mips/alchemy/board-mtx1.c @@ -145,7 +145,7 @@ static struct platform_device mtx1_wdt = { .resource = mtx1_wdt_res, }; -static struct gpio_led default_leds[] = { +static const struct gpio_led default_leds[] = { { .name = "mtx1:green", .gpio = 211, -- 2.7.4