提交 4f78230f 编写于 作者: M Masahiro Yamada 提交者: Ulf Hansson

mmc: sdhci: use IS_REACHABLE(CONFIG_LEDS_CLASS) to enable LED code

defined(CONFIG_LEDS_CLASS) || (defined(CONFIG_LEDS_CLASS_MODULE) && \
    defined(CONFIG_MMC_SDHCI_MODULE))

is equivalent to:

defined(CONFIG_LEDS_CLASS) || (defined(CONFIG_LEDS_CLASS_MODULE) && \
    defined(MODULE))

and it can also be written shortly as:

IS_REACHABLE(CONFIG_LEDS_CLASS)
Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: NAdrian Hunter <adrian.hunter@intel.com>
Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
上级 4228b213
...@@ -259,9 +259,7 @@ static void __sdhci_led_deactivate(struct sdhci_host *host) ...@@ -259,9 +259,7 @@ static void __sdhci_led_deactivate(struct sdhci_host *host)
sdhci_writeb(host, ctrl, SDHCI_HOST_CONTROL); sdhci_writeb(host, ctrl, SDHCI_HOST_CONTROL);
} }
#if defined(CONFIG_LEDS_CLASS) || (defined(CONFIG_LEDS_CLASS_MODULE) && \ #if IS_REACHABLE(CONFIG_LEDS_CLASS)
defined(CONFIG_MMC_SDHCI_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)
{ {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册