aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/leds.h
diff options
context:
space:
mode:
authorTrent Piepho <tpiepho@freescale.com>2008-10-13 05:13:01 -0400
committerRichard Purdie <rpurdie@rpsys.net>2008-10-20 17:34:12 -0400
commit326bb8a5a12c6298a6bf6c74af490b1858b2f12c (patch)
treefd513f4869c4071a585350e458ffd7e8e5f834ac /include/linux/leds.h
parent132e9306beedd049bc5de037f1996731a2ca3eed (diff)
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: Trent Piepho <tpiepho@freescale.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'include/linux/leds.h')
-rw-r--r--include/linux/leds.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/leds.h b/include/linux/leds.h
index d41ccb56146a..d3a73f5a48c3 100644
--- a/include/linux/leds.h
+++ b/include/linux/leds.h
@@ -123,7 +123,7 @@ extern void ledtrig_ide_activity(void);
123 */ 123 */
124struct led_info { 124struct led_info {
125 const char *name; 125 const char *name;
126 char *default_trigger; 126 const char *default_trigger;
127 int flags; 127 int flags;
128}; 128};
129 129
@@ -135,7 +135,7 @@ struct led_platform_data {
135/* For the leds-gpio driver */ 135/* For the leds-gpio driver */
136struct gpio_led { 136struct gpio_led {
137 const char *name; 137 const char *name;
138 char *default_trigger; 138 const char *default_trigger;
139 unsigned gpio; 139 unsigned gpio;
140 u8 active_low; 140 u8 active_low;
141}; 141};