Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750912AbdLZGdn (ORCPT ); Tue, 26 Dec 2017 01:33:43 -0500 Received: from mail-pg0-f67.google.com ([74.125.83.67]:36544 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750865AbdLZGdj (ORCPT ); Tue, 26 Dec 2017 01:33:39 -0500 X-Google-Smtp-Source: ACJfBovYiMy94T6gAUkpBns8hTGFcUqviqem+SCQhirdUaAiexQJV7+lav8fttEx64KIY4x89LYQfg== 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 03/11 v2] MIPS: TXX9: constify gpio_led Date: Tue, 26 Dec 2017 12:03:10 +0530 Message-Id: <15230823b5416a3e5814176df3ad3ff73ff3d037.1514267721.git.arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 2.7.4 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: 1030 Lines: 30 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/txx9/rbtx4927/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/mips/txx9/rbtx4927/setup.c b/arch/mips/txx9/rbtx4927/setup.c index f5b367e..31955c1 100644 --- a/arch/mips/txx9/rbtx4927/setup.c +++ b/arch/mips/txx9/rbtx4927/setup.c @@ -319,7 +319,7 @@ static void __init rbtx4927_mtd_init(void) static void __init rbtx4927_gpioled_init(void) { - static struct gpio_led leds[] = { + static const struct gpio_led leds[] = { { .name = "gpioled:green:0", .gpio = 0, .active_low = 1, }, { .name = "gpioled:green:1", .gpio = 1, .active_low = 1, }, }; -- 2.7.4