Skip to content

Commit

Permalink
ARM: OMAP1: constify gpio_led
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Tony Lindgren <[email protected]>
  • Loading branch information
ArvindYadavCs authored and tmlind committed Jul 2, 2018
1 parent ce397d2 commit 40dda87
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion arch/arm/mach-omap1/board-h2.c
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ static struct platform_device h2_kp_device = {
.resource = h2_kp_resources,
};

static struct gpio_led h2_gpio_led_pins[] = {
static const struct gpio_led h2_gpio_led_pins[] = {
{
.name = "h2:red",
.default_trigger = "heartbeat",
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap1/board-h3.c
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ static struct spi_board_info h3_spi_board_info[] __initdata = {
},
};

static struct gpio_led h3_gpio_led_pins[] = {
static const struct gpio_led h3_gpio_led_pins[] = {
{
.name = "h3:red",
.default_trigger = "heartbeat",
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap1/board-htcherald.c
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ static struct platform_device herald_gpiokeys_device = {
};

/* LEDs for the Herald. These connect to the HTCPLD GPIO device. */
static struct gpio_led gpio_leds[] = {
static const struct gpio_led gpio_leds[] = {
{"dpad", NULL, HTCPLD_GPIO_LED_DPAD, 0, 0, LEDS_GPIO_DEFSTATE_OFF},
{"kbd", NULL, HTCPLD_GPIO_LED_KBD, 0, 0, LEDS_GPIO_DEFSTATE_OFF},
{"vibrate", NULL, HTCPLD_GPIO_LED_VIBRATE, 0, 0, LEDS_GPIO_DEFSTATE_OFF},
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/mach-omap1/board-osk.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ static struct platform_device *osk5912_devices[] __initdata = {
&osk5912_cf_device,
};

static struct gpio_led tps_leds[] = {
static const struct gpio_led tps_leds[] = {
/* NOTE: D9 and D2 have hardware blink support.
* Also, D9 requires non-battery power.
*/
Expand Down Expand Up @@ -385,7 +385,7 @@ static struct platform_device osk5912_lcd_device = {
.id = -1,
};

static struct gpio_led mistral_gpio_led_pins[] = {
static const struct gpio_led mistral_gpio_led_pins[] = {
{
.name = "mistral:red",
.default_trigger = "heartbeat",
Expand Down

0 comments on commit 40dda87

Please sign in to comment.