]> git.ipfire.org Git - people/ms/linux.git/commitdiff
sdhci: fix led naming
authorHelmut Schaa <helmut.schaa@googlemail.com>
Sat, 14 Feb 2009 15:22:39 +0000 (16:22 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 17 Mar 2009 00:52:57 +0000 (17:52 -0700)
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@googlemail.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/mmc/host/sdhci.c
drivers/mmc/host/sdhci.h

index e3a8133560a2b41a19f15dd193a83c80d5727e4f..cc0feaeb2497499940f8eafaf69d9c1ee5de5603 100644 (file)
@@ -1690,7 +1690,9 @@ int sdhci_add_host(struct sdhci_host *host)
 #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;
index 197d4a05f4ae975ecf1fe600adcf9ec2ce79fbb5..590d78fe9d68166745f1d02428857f9c9254d9ea 100644 (file)
@@ -220,6 +220,7 @@ struct sdhci_host {
 
 #ifdef CONFIG_LEDS_CLASS
        struct led_classdev     led;            /* LED control */
+       char   led_name[32];
 #endif
 
        spinlock_t              lock;           /* Mutex */