Commit 35ff8554 authored by Éric Piel's avatar Éric Piel Committed by Pierre Ossman

sdhci: activate led support also when module

CONFIG_LEDS_CLASS is defined only if led-class is built-in, otherwise
when it is a module the option is called CONFIG_LEDS_CLASS_MODULE. Led
support should also be activated in this case.
Signed-off-by: default avatarEric Piel <eric.piel@tremplin-utc.net>
Signed-off-by: default avatarPierre Ossman <drzeus@drzeus.cx>
parent b7a03210
...@@ -149,7 +149,7 @@ static void sdhci_deactivate_led(struct sdhci_host *host) ...@@ -149,7 +149,7 @@ static void sdhci_deactivate_led(struct sdhci_host *host)
writeb(ctrl, host->ioaddr + SDHCI_HOST_CONTROL); writeb(ctrl, host->ioaddr + SDHCI_HOST_CONTROL);
} }
#ifdef CONFIG_LEDS_CLASS #if defined(CONFIG_LEDS_CLASS) || defined(CONFIG_LEDS_CLASS_MODULE)
static void sdhci_led_control(struct led_classdev *led, static void sdhci_led_control(struct led_classdev *led,
enum led_brightness brightness) enum led_brightness brightness)
{ {
...@@ -994,7 +994,7 @@ static void sdhci_request(struct mmc_host *mmc, struct mmc_request *mrq) ...@@ -994,7 +994,7 @@ static void sdhci_request(struct mmc_host *mmc, struct mmc_request *mrq)
WARN_ON(host->mrq != NULL); WARN_ON(host->mrq != NULL);
#ifndef CONFIG_LEDS_CLASS #if defined(CONFIG_LEDS_CLASS) || defined(CONFIG_LEDS_CLASS_MODULE)
sdhci_activate_led(host); sdhci_activate_led(host);
#endif #endif
...@@ -1201,7 +1201,7 @@ static void sdhci_tasklet_finish(unsigned long param) ...@@ -1201,7 +1201,7 @@ static void sdhci_tasklet_finish(unsigned long param)
host->cmd = NULL; host->cmd = NULL;
host->data = NULL; host->data = NULL;
#ifndef CONFIG_LEDS_CLASS #if defined(CONFIG_LEDS_CLASS) || defined(CONFIG_LEDS_CLASS_MODULE)
sdhci_deactivate_led(host); sdhci_deactivate_led(host);
#endif #endif
...@@ -1717,7 +1717,7 @@ int sdhci_add_host(struct sdhci_host *host) ...@@ -1717,7 +1717,7 @@ int sdhci_add_host(struct sdhci_host *host)
sdhci_dumpregs(host); sdhci_dumpregs(host);
#endif #endif
#ifdef CONFIG_LEDS_CLASS #if defined(CONFIG_LEDS_CLASS) || defined(CONFIG_LEDS_CLASS_MODULE)
host->led.name = mmc_hostname(mmc); host->led.name = mmc_hostname(mmc);
host->led.brightness = LED_OFF; host->led.brightness = LED_OFF;
host->led.default_trigger = mmc_hostname(mmc); host->led.default_trigger = mmc_hostname(mmc);
...@@ -1739,7 +1739,7 @@ int sdhci_add_host(struct sdhci_host *host) ...@@ -1739,7 +1739,7 @@ int sdhci_add_host(struct sdhci_host *host)
return 0; return 0;
#ifdef CONFIG_LEDS_CLASS #if defined(CONFIG_LEDS_CLASS) || defined(CONFIG_LEDS_CLASS_MODULE)
reset: reset:
sdhci_reset(host, SDHCI_RESET_ALL); sdhci_reset(host, SDHCI_RESET_ALL);
free_irq(host->irq, host); free_irq(host->irq, host);
...@@ -1775,7 +1775,7 @@ void sdhci_remove_host(struct sdhci_host *host, int dead) ...@@ -1775,7 +1775,7 @@ void sdhci_remove_host(struct sdhci_host *host, int dead)
mmc_remove_host(host->mmc); mmc_remove_host(host->mmc);
#ifdef CONFIG_LEDS_CLASS #if defined(CONFIG_LEDS_CLASS) || defined(CONFIG_LEDS_CLASS_MODULE)
led_classdev_unregister(&host->led); led_classdev_unregister(&host->led);
#endif #endif
......
...@@ -220,7 +220,7 @@ struct sdhci_host { ...@@ -220,7 +220,7 @@ struct sdhci_host {
struct mmc_host *mmc; /* MMC structure */ struct mmc_host *mmc; /* MMC structure */
u64 dma_mask; /* custom DMA mask */ u64 dma_mask; /* custom DMA mask */
#ifdef CONFIG_LEDS_CLASS #if defined(CONFIG_LEDS_CLASS) || defined(CONFIG_LEDS_CLASS_MODULE)
struct led_classdev led; /* LED control */ struct led_classdev led; /* LED control */
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment