mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-18 06:15:12 +00:00
sdhci: fix led naming
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>
This commit is contained in:
parent
58a5dd3e0e
commit
5dbace0c9b
@ -1722,7 +1722,9 @@ int sdhci_add_host(struct sdhci_host *host)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef SDHCI_USE_LEDS_CLASS
|
#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.brightness = LED_OFF;
|
||||||
host->led.default_trigger = mmc_hostname(mmc);
|
host->led.default_trigger = mmc_hostname(mmc);
|
||||||
host->led.brightness_set = sdhci_led_control;
|
host->led.brightness_set = sdhci_led_control;
|
||||||
|
@ -220,6 +220,7 @@ struct sdhci_host {
|
|||||||
|
|
||||||
#if defined(CONFIG_LEDS_CLASS) || defined(CONFIG_LEDS_CLASS_MODULE)
|
#if defined(CONFIG_LEDS_CLASS) || defined(CONFIG_LEDS_CLASS_MODULE)
|
||||||
struct led_classdev led; /* LED control */
|
struct led_classdev led; /* LED control */
|
||||||
|
char led_name[32];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
spinlock_t lock; /* Mutex */
|
spinlock_t lock; /* Mutex */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user