Skip to content

Commit

Permalink
MIPS: AR7: 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 <[email protected]>
Cc: Ralf Baechle <[email protected]>
Cc: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/18007/
[[email protected]: improve commit message]
Signed-off-by: James Hogan <[email protected]>
  • Loading branch information
ArvindYadavCs authored and amalon committed Feb 19, 2018
1 parent 1fd88d9 commit 041f40f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions arch/mips/ar7/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -346,20 +346,20 @@ static struct platform_device ar7_udc = {
/*****************************************************************************
* LEDs
****************************************************************************/
static struct gpio_led default_leds[] = {
static const struct gpio_led default_leds[] = {
{
.name = "status",
.gpio = 8,
.active_low = 1,
},
};

static struct gpio_led titan_leds[] = {
static const struct gpio_led titan_leds[] = {
{ .name = "status", .gpio = 8, .active_low = 1, },
{ .name = "wifi", .gpio = 13, .active_low = 1, },
};

static struct gpio_led dsl502t_leds[] = {
static const struct gpio_led dsl502t_leds[] = {
{
.name = "status",
.gpio = 9,
Expand All @@ -377,7 +377,7 @@ static struct gpio_led dsl502t_leds[] = {
},
};

static struct gpio_led dg834g_leds[] = {
static const struct gpio_led dg834g_leds[] = {
{
.name = "ppp",
.gpio = 6,
Expand Down Expand Up @@ -406,7 +406,7 @@ static struct gpio_led dg834g_leds[] = {
},
};

static struct gpio_led fb_sl_leds[] = {
static const struct gpio_led fb_sl_leds[] = {
{
.name = "1",
.gpio = 7,
Expand All @@ -433,7 +433,7 @@ static struct gpio_led fb_sl_leds[] = {
},
};

static struct gpio_led fb_fon_leds[] = {
static const struct gpio_led fb_fon_leds[] = {
{
.name = "1",
.gpio = 8,
Expand All @@ -459,7 +459,7 @@ static struct gpio_led fb_fon_leds[] = {
},
};

static struct gpio_led gt701_leds[] = {
static const struct gpio_led gt701_leds[] = {
{
.name = "inet:green",
.gpio = 13,
Expand Down

0 comments on commit 041f40f

Please sign in to comment.