Skip to content

Commit

Permalink
MIPS: Alchemy: Constify gpio_led
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
ArvindYadavCs authored and amalon committed Feb 19, 2018
1 parent 2fe69ed commit 1fd88d9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion arch/mips/alchemy/board-gpr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/alchemy/board-mtx1.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 1fd88d9

Please sign in to comment.