]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
sdhci: fix led naming
authorHelmut Schaa <helmut.schaa@googlemail.com>
Sat, 14 Feb 2009 15:22:39 +0000 (16:22 +0100)
committerPierre Ossman <drzeus@drzeus.cx>
Wed, 18 Feb 2009 20:02:38 +0000 (21:02 +0100)
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@googlemail.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
drivers/mmc/host/sdhci.c
drivers/mmc/host/sdhci.h

index 24d7414a331511380aa2fcb253a680ab7450b56e..f52f3053ed9251a9d3c3b795997e0f6dbd3ffbf5 100644 (file)
@@ -1722,7 +1722,9 @@ int sdhci_add_host(struct sdhci_host *host)
 #endif
 
 #ifdef SDHCI_USE_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;
index ffeab227d95b90912a4f538ef48b8f4d2aae12b9..ebb83657e27ab2b1257ab8ef54a3cb6de18d5abf 100644 (file)
@@ -220,6 +220,7 @@ struct sdhci_host {
 
 #if defined(CONFIG_LEDS_CLASS) || defined(CONFIG_LEDS_CLASS_MODULE)
        struct led_classdev     led;            /* LED control */
+       char   led_name[32];
 #endif
 
        spinlock_t              lock;           /* Mutex */