linux-mips
[Top] [All Lists]

[PATCH 03/11 v2] MIPS: TXX9: constify gpio_led

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
Subject: [PATCH 03/11 v2] MIPS: TXX9: constify gpio_led
From: Arvind Yadav <arvind.yadav.cs@gmail.com>
Date: Tue, 26 Dec 2017 12:03:10 +0530
Cc: linux-kernel@vger.kernel.org
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=IbqCrLJE5wUvRmPWbtM3FZaY8dwh3wJl/7lWwBkHX60=; b=PS5GhsN11CqB8b8cgxeNI+qURMgAwOmKv3PyJP+gpv+v40SZYYuQtYkVXVfFJWjKW5 2ZTG5xKHCQxXHvAvBR9DwVDn3IClBzDrAX3EOQjzTzRQ43N8vbcYeAuOX264hSvlzLeM Guc6XqbErYaYiSxiKIaxLs48Kuzgk5gtU7XMvPW3Bx3dee5nJw26vuwCz872pdfG8EzY MaipHTwDk6j2hIeWPK9q+Qep2ri6hYJQ2QaKig8tp4ias69idyP59seuGnCawMhNuZZZ c3vnC6xrnLGRh4gwVsZmKqTFz6zbLm7avX2UVsL/5xUBSur3628stlMzlFXXB0RK0yj8 QHoQ==
In-reply-to: <de0879ef47b96776e3f18a1889c41d976a677b21.1514267721.git.arvind.yadav.cs@gmail.com>
In-reply-to: <de0879ef47b96776e3f18a1889c41d976a677b21.1514267721.git.arvind.yadav.cs@gmail.com>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <de0879ef47b96776e3f18a1889c41d976a677b21.1514267721.git.arvind.yadav.cs@gmail.com>
References: <de0879ef47b96776e3f18a1889c41d976a677b21.1514267721.git.arvind.yadav.cs@gmail.com>
Sender: linux-mips-bounce@linux-mips.org
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/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


<Prev in Thread] Current Thread [Next in Thread>