[patch 047/114] sdhci: fix led naming

From: Greg KH
Date: Fri Mar 13 2009 - 21:37:38 EST


2.6.28-stable review patch. If anyone has any objections, please let us know.

------------------

From: Helmut Schaa <helmut.schaa@xxxxxxxxxxxxxx>

commit 5dbace0c9ba110c1a3810a89fa6bf12b7574b5a3 upstream.

Fix the led device naming for the sdhci driver.

The led class documentation defines the led name to have the
form "devicename:colour:function" while not applicable sections
should be left blank.

To comply with the documentation the led device name is changed
from "mmc*" to "mmc*::".

Signed-off-by: Helmut Schaa <helmut.schaa@xxxxxxxxxxxxxx>
Signed-off-by: Pierre Ossman <drzeus@xxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>

---
drivers/mmc/host/sdhci.c | 4 +++-
drivers/mmc/host/sdhci.h | 1 +
2 files changed, 4 insertions(+), 1 deletion(-)

--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -1718,7 +1718,9 @@ int sdhci_add_host(struct sdhci_host *ho
#endif

#ifdef CONFIG_LEDS_CLASS
- host->led.name = mmc_hostname(mmc);
+ snprintf(host->led_name, sizeof(host->led_name),
+ "%s::", mmc_hostname(mmc));
+ host->led.name = host->led_name;
host->led.brightness = LED_OFF;
host->led.default_trigger = mmc_hostname(mmc);
host->led.brightness_set = sdhci_led_control;
--- a/drivers/mmc/host/sdhci.h
+++ b/drivers/mmc/host/sdhci.h
@@ -222,6 +222,7 @@ struct sdhci_host {

#ifdef CONFIG_LEDS_CLASS
struct led_classdev led; /* LED control */
+ char led_name[32];
#endif

spinlock_t lock; /* Mutex */


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/