lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <102268e7fdae7068f4da9cb1c95bcabce38cc270.1514267721.git.arvind.yadav.cs@gmail.com>
Date:   Tue, 26 Dec 2017 12:04:52 +0530
From:   Arvind Yadav <arvind.yadav.cs@...il.com>
To:     nsekhar@...com, khilman@...nel.org, linux@...linux.org.uk,
        kaloz@...nwrt.org, khalasa@...p.pl, aaro.koskinen@....fi,
        tony@...mide.com, jason@...edaemon.net, andrew@...n.ch,
        sebastian.hesselbarth@...il.com,
        gregory.clement@...e-electrons.com, daniel@...que.org,
        haojian.zhuang@...il.com, marek.vasut@...il.com,
        slapin@...fans.org, jic23@....ac.uk, kgene@...nel.org,
        krzk@...nel.org, ralf@...ux-mips.org, ysato@...rs.sourceforge.jp,
        dalias@...c.org, tglx@...utronix.de, mingo@...hat.com,
        hpa@...or.com
Cc:     linux-kernel@...r.kernel.org, x86@...nel.org
Subject: [PATCH 04/11 v2] x86: geode: constify gpio_led

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@...il.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/x86/platform/geode/alix.c    | 2 +-
 arch/x86/platform/geode/geos.c    | 2 +-
 arch/x86/platform/geode/net5501.c | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/x86/platform/geode/alix.c b/arch/x86/platform/geode/alix.c
index 1865c19..f447ed7 100644
--- a/arch/x86/platform/geode/alix.c
+++ b/arch/x86/platform/geode/alix.c
@@ -71,7 +71,7 @@ static struct platform_device alix_buttons_dev = {
 	}
 };
 
-static struct gpio_led alix_leds[] = {
+static const struct gpio_led alix_leds[] = {
 	{
 		.name = "alix:1",
 		.gpio = 6,
diff --git a/arch/x86/platform/geode/geos.c b/arch/x86/platform/geode/geos.c
index 4fcdb91..146697b 100644
--- a/arch/x86/platform/geode/geos.c
+++ b/arch/x86/platform/geode/geos.c
@@ -54,7 +54,7 @@ static struct platform_device geos_buttons_dev = {
 	}
 };
 
-static struct gpio_led geos_leds[] = {
+static const struct gpio_led geos_leds[] = {
 	{
 		.name = "geos:1",
 		.gpio = 6,
diff --git a/arch/x86/platform/geode/net5501.c b/arch/x86/platform/geode/net5501.c
index a2f6b98..e5e1a64 100644
--- a/arch/x86/platform/geode/net5501.c
+++ b/arch/x86/platform/geode/net5501.c
@@ -57,7 +57,7 @@ static struct platform_device net5501_buttons_dev = {
 	}
 };
 
-static struct gpio_led net5501_leds[] = {
+static const struct gpio_led net5501_leds[] = {
 	{
 		.name = "net5501:1",
 		.gpio = 6,
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ