]> git.baikalelectronics.ru Git - kernel.git/commitdiff
MIPS: Alchemy: Constify gpio_led
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Tue, 26 Dec 2017 06:33:08 +0000 (12:03 +0530)
committerJames Hogan <jhogan@kernel.org>
Mon, 19 Feb 2018 10:55:35 +0000 (10:55 +0000)
gpio_leds are not supposed to change at runtime. struct
gpio_led_platform_data contains a const struct gpio_led pointer since
v2.6.39, so mark the gpio_led structures const too.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/18006/
[jhogan@kernel.org: improve commit message]
Signed-off-by: James Hogan <jhogan@kernel.org>
arch/mips/alchemy/board-gpr.c
arch/mips/alchemy/board-mtx1.c

index 328d697e72b49b505c08d5d4205687632f4ef0b1..4e79dbd54a339143e3a3810ec45b0ee5fb734f2d 100644 (file)
@@ -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,
index 85bb75669b0d59797a626f40610292f2f60e0bb2..aab55aaf3d62a10c5e9882f4fe56f6a32c9d2a39 100644 (file)
@@ -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,