Skip to contentSkip to conversation

leds: mark led_classdev.default_trigger as const

PATCH In review Anton Vorontsov 1 participant 1 message Mar 26, 2008 LED

lore
Share & tools
lore
#0 lore raw

PATCH 2/5 leds: mark led_classdev.default_trigger as const

LED classdev core doesn't modify memory pointed by the default_trigger, so mark it as const and we'll able to pass const char *s without getting compiler warnings.

---
 include/linux/leds.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
include/linux/leds.h +1 -1
index 0201f6f..2122a77 100644
@@ -45,7 +45,7 @@ struct led_classdev {
 
 	struct device		*dev;
 	struct list_head	 node;			/* LED Device list */
-	char			*default_trigger;	/* Trigger to use */
+	const char		*default_trigger;	/* Trigger to use */
 
 #ifdef CONFIG_LEDS_TRIGGERS
 	/* Protects the trigger data below */
Signature · 1 line
1.5.2.2