* [PATCH v2 1/2] mmc: sdhci: use IS_REACHABLE(CONFIG_LEDS_CLASS) to enable LED code
@ 2016-04-14 4:19 Masahiro Yamada
2016-04-14 4:19 ` [PATCH v2 2/2] mmc: sdhci: use IS_ENABLE(CONFIG_LEDS_CLASS) to enable LED struct members Masahiro Yamada
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Masahiro Yamada @ 2016-04-14 4:19 UTC (permalink / raw)
To: linux-mmc; +Cc: Masahiro Yamada, linux-kernel, Adrian Hunter, Ulf Hansson
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: Masahiro Yamada <yamada.masahiro@socionext.com>
---
Changes in v2:
- Rebase on the next branch (7766e58f5be39dcc35d30a703422a3d0b8ec8c0c)
drivers/mmc/host/sdhci.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index b284924..eedc18a 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -259,9 +259,7 @@ static void __sdhci_led_deactivate(struct sdhci_host *host)
sdhci_writeb(host, ctrl, SDHCI_HOST_CONTROL);
}
-#if defined(CONFIG_LEDS_CLASS) || (defined(CONFIG_LEDS_CLASS_MODULE) && \
- defined(CONFIG_MMC_SDHCI_MODULE))
-
+#if IS_REACHABLE(CONFIG_LEDS_CLASS)
static void sdhci_led_control(struct led_classdev *led,
enum led_brightness brightness)
{
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2 2/2] mmc: sdhci: use IS_ENABLE(CONFIG_LEDS_CLASS) to enable LED struct members
2016-04-14 4:19 [PATCH v2 1/2] mmc: sdhci: use IS_REACHABLE(CONFIG_LEDS_CLASS) to enable LED code Masahiro Yamada
@ 2016-04-14 4:19 ` Masahiro Yamada
2016-04-20 6:15 ` Adrian Hunter
2016-04-22 12:54 ` Ulf Hansson
2016-04-20 6:14 ` [PATCH v2 1/2] mmc: sdhci: use IS_REACHABLE(CONFIG_LEDS_CLASS) to enable LED code Adrian Hunter
2016-04-22 12:54 ` Ulf Hansson
2 siblings, 2 replies; 6+ messages in thread
From: Masahiro Yamada @ 2016-04-14 4:19 UTC (permalink / raw)
To: linux-mmc; +Cc: Masahiro Yamada, linux-kernel, Adrian Hunter, Ulf Hansson
defined(CONFIG_LEDS_CLASS) || defined(CONFIG_LEDS_CLASS_MODULE)
is equivalent to:
IS_ENABLED(CONFIG_LEDS_CLASS)
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---
Changes in v2:
- Newly added
drivers/mmc/host/sdhci.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h
index 0decc85..27e8603 100644
--- a/drivers/mmc/host/sdhci.h
+++ b/drivers/mmc/host/sdhci.h
@@ -428,7 +428,7 @@ struct sdhci_host {
struct mmc_host_ops mmc_host_ops; /* MMC host ops */
u64 dma_mask; /* custom DMA mask */
-#if defined(CONFIG_LEDS_CLASS) || defined(CONFIG_LEDS_CLASS_MODULE)
+#if IS_ENABLED(CONFIG_LEDS_CLASS)
struct led_classdev led; /* LED control */
char led_name[32];
#endif
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2 1/2] mmc: sdhci: use IS_REACHABLE(CONFIG_LEDS_CLASS) to enable LED code
2016-04-14 4:19 [PATCH v2 1/2] mmc: sdhci: use IS_REACHABLE(CONFIG_LEDS_CLASS) to enable LED code Masahiro Yamada
2016-04-14 4:19 ` [PATCH v2 2/2] mmc: sdhci: use IS_ENABLE(CONFIG_LEDS_CLASS) to enable LED struct members Masahiro Yamada
@ 2016-04-20 6:14 ` Adrian Hunter
2016-04-22 12:54 ` Ulf Hansson
2 siblings, 0 replies; 6+ messages in thread
From: Adrian Hunter @ 2016-04-20 6:14 UTC (permalink / raw)
To: Masahiro Yamada, linux-mmc; +Cc: linux-kernel, Ulf Hansson
On 14/04/16 07:19, Masahiro Yamada wrote:
> 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: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
> ---
>
> Changes in v2:
> - Rebase on the next branch (7766e58f5be39dcc35d30a703422a3d0b8ec8c0c)
>
> drivers/mmc/host/sdhci.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> index b284924..eedc18a 100644
> --- a/drivers/mmc/host/sdhci.c
> +++ b/drivers/mmc/host/sdhci.c
> @@ -259,9 +259,7 @@ static void __sdhci_led_deactivate(struct sdhci_host *host)
> sdhci_writeb(host, ctrl, SDHCI_HOST_CONTROL);
> }
>
> -#if defined(CONFIG_LEDS_CLASS) || (defined(CONFIG_LEDS_CLASS_MODULE) && \
> - defined(CONFIG_MMC_SDHCI_MODULE))
> -
> +#if IS_REACHABLE(CONFIG_LEDS_CLASS)
> static void sdhci_led_control(struct led_classdev *led,
> enum led_brightness brightness)
> {
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 2/2] mmc: sdhci: use IS_ENABLE(CONFIG_LEDS_CLASS) to enable LED struct members
2016-04-14 4:19 ` [PATCH v2 2/2] mmc: sdhci: use IS_ENABLE(CONFIG_LEDS_CLASS) to enable LED struct members Masahiro Yamada
@ 2016-04-20 6:15 ` Adrian Hunter
2016-04-22 12:54 ` Ulf Hansson
1 sibling, 0 replies; 6+ messages in thread
From: Adrian Hunter @ 2016-04-20 6:15 UTC (permalink / raw)
To: Masahiro Yamada, linux-mmc; +Cc: linux-kernel, Ulf Hansson
On 14/04/16 07:19, Masahiro Yamada wrote:
> defined(CONFIG_LEDS_CLASS) || defined(CONFIG_LEDS_CLASS_MODULE)
>
> is equivalent to:
>
> IS_ENABLED(CONFIG_LEDS_CLASS)
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
> ---
>
> Changes in v2:
> - Newly added
>
> drivers/mmc/host/sdhci.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h
> index 0decc85..27e8603 100644
> --- a/drivers/mmc/host/sdhci.h
> +++ b/drivers/mmc/host/sdhci.h
> @@ -428,7 +428,7 @@ struct sdhci_host {
> struct mmc_host_ops mmc_host_ops; /* MMC host ops */
> u64 dma_mask; /* custom DMA mask */
>
> -#if defined(CONFIG_LEDS_CLASS) || defined(CONFIG_LEDS_CLASS_MODULE)
> +#if IS_ENABLED(CONFIG_LEDS_CLASS)
> struct led_classdev led; /* LED control */
> char led_name[32];
> #endif
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 2/2] mmc: sdhci: use IS_ENABLE(CONFIG_LEDS_CLASS) to enable LED struct members
2016-04-14 4:19 ` [PATCH v2 2/2] mmc: sdhci: use IS_ENABLE(CONFIG_LEDS_CLASS) to enable LED struct members Masahiro Yamada
2016-04-20 6:15 ` Adrian Hunter
@ 2016-04-22 12:54 ` Ulf Hansson
1 sibling, 0 replies; 6+ messages in thread
From: Ulf Hansson @ 2016-04-22 12:54 UTC (permalink / raw)
To: Masahiro Yamada; +Cc: linux-mmc, linux-kernel, Adrian Hunter
On 14 April 2016 at 06:19, Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
> defined(CONFIG_LEDS_CLASS) || defined(CONFIG_LEDS_CLASS_MODULE)
>
> is equivalent to:
>
> IS_ENABLED(CONFIG_LEDS_CLASS)
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Thanks, applied for next!
Kind regards
Uffe
> ---
>
> Changes in v2:
> - Newly added
>
> drivers/mmc/host/sdhci.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h
> index 0decc85..27e8603 100644
> --- a/drivers/mmc/host/sdhci.h
> +++ b/drivers/mmc/host/sdhci.h
> @@ -428,7 +428,7 @@ struct sdhci_host {
> struct mmc_host_ops mmc_host_ops; /* MMC host ops */
> u64 dma_mask; /* custom DMA mask */
>
> -#if defined(CONFIG_LEDS_CLASS) || defined(CONFIG_LEDS_CLASS_MODULE)
> +#if IS_ENABLED(CONFIG_LEDS_CLASS)
> struct led_classdev led; /* LED control */
> char led_name[32];
> #endif
> --
> 1.9.1
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 1/2] mmc: sdhci: use IS_REACHABLE(CONFIG_LEDS_CLASS) to enable LED code
2016-04-14 4:19 [PATCH v2 1/2] mmc: sdhci: use IS_REACHABLE(CONFIG_LEDS_CLASS) to enable LED code Masahiro Yamada
2016-04-14 4:19 ` [PATCH v2 2/2] mmc: sdhci: use IS_ENABLE(CONFIG_LEDS_CLASS) to enable LED struct members Masahiro Yamada
2016-04-20 6:14 ` [PATCH v2 1/2] mmc: sdhci: use IS_REACHABLE(CONFIG_LEDS_CLASS) to enable LED code Adrian Hunter
@ 2016-04-22 12:54 ` Ulf Hansson
2 siblings, 0 replies; 6+ messages in thread
From: Ulf Hansson @ 2016-04-22 12:54 UTC (permalink / raw)
To: Masahiro Yamada; +Cc: linux-mmc, linux-kernel, Adrian Hunter
On 14 April 2016 at 06:19, Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
> 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: Masahiro Yamada <yamada.masahiro@socionext.com>
Thanks, applied for next!
Kind regards
Uffe
> ---
>
> Changes in v2:
> - Rebase on the next branch (7766e58f5be39dcc35d30a703422a3d0b8ec8c0c)
>
> drivers/mmc/host/sdhci.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> index b284924..eedc18a 100644
> --- a/drivers/mmc/host/sdhci.c
> +++ b/drivers/mmc/host/sdhci.c
> @@ -259,9 +259,7 @@ static void __sdhci_led_deactivate(struct sdhci_host *host)
> sdhci_writeb(host, ctrl, SDHCI_HOST_CONTROL);
> }
>
> -#if defined(CONFIG_LEDS_CLASS) || (defined(CONFIG_LEDS_CLASS_MODULE) && \
> - defined(CONFIG_MMC_SDHCI_MODULE))
> -
> +#if IS_REACHABLE(CONFIG_LEDS_CLASS)
> static void sdhci_led_control(struct led_classdev *led,
> enum led_brightness brightness)
> {
> --
> 1.9.1
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-04-22 12:55 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-14 4:19 [PATCH v2 1/2] mmc: sdhci: use IS_REACHABLE(CONFIG_LEDS_CLASS) to enable LED code Masahiro Yamada
2016-04-14 4:19 ` [PATCH v2 2/2] mmc: sdhci: use IS_ENABLE(CONFIG_LEDS_CLASS) to enable LED struct members Masahiro Yamada
2016-04-20 6:15 ` Adrian Hunter
2016-04-22 12:54 ` Ulf Hansson
2016-04-20 6:14 ` [PATCH v2 1/2] mmc: sdhci: use IS_REACHABLE(CONFIG_LEDS_CLASS) to enable LED code Adrian Hunter
2016-04-22 12:54 ` Ulf Hansson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).