Commit 326bb8a5 authored by Trent Piepho's avatar Trent Piepho Committed by Richard Purdie

leds: Make default trigger fields const

The default_trigger fields of struct gpio_led and thus struct
led_classdev are pretty much always assigned from a string literal,
which means the string can't be modified.  Which is fine, since there is
no reason to modify the string and in fact it never is.

But they should be marked const to prevent such code from being added,
to prevent warnings if -Wwrite-strings is used, when assigned from a
constant string other than a string literal (which produces a warning
under current kernel compiler flags), and for general good coding
practices.
Signed-off-by: default avatarTrent Piepho <tpiepho@freescale.com>
Signed-off-by: default avatarRichard Purdie <rpurdie@linux.intel.com>
parent 132e9306
...@@ -123,7 +123,7 @@ extern void ledtrig_ide_activity(void); ...@@ -123,7 +123,7 @@ extern void ledtrig_ide_activity(void);
*/ */
struct led_info { struct led_info {
const char *name; const char *name;
char *default_trigger; const char *default_trigger;
int flags; int flags;
}; };
...@@ -135,7 +135,7 @@ struct led_platform_data { ...@@ -135,7 +135,7 @@ struct led_platform_data {
/* For the leds-gpio driver */ /* For the leds-gpio driver */
struct gpio_led { struct gpio_led {
const char *name; const char *name;
char *default_trigger; const char *default_trigger;
unsigned gpio; unsigned gpio;
u8 active_low; u8 active_low;
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment