* [PATCH] leds: make LEDS_GPIO_REGISTER depend on NEW_LEDS
@ 2011-05-28 9:52 Axel Lin
2011-05-28 17:47 ` Uwe Kleine-König
0 siblings, 1 reply; 4+ messages in thread
From: Axel Lin @ 2011-05-28 9:52 UTC (permalink / raw)
To: linux-kernel; +Cc: Uwe Kleine-König, Richard Purdie, Andrew Morton
Commit 4440673a "leds: provide helper to register "leds-gpio" devices"
adds "config LEDS_GPIO_REGISTER" in drivers/leds/Kconfig.
However, config LEDS_GPIO_REGISTER does not depend on NEW_LEDS, while executing
make menuconfig a side-effect is observed that the "LED drivers" and
"LED Triggers" are now displayed at the same level of "LED Support".
( They was in sub-menu of "LED Support" before the commit. )
This patch makes LEDS_GPIO_REGISTER depend on NEW_LEDS to correctly show
"LED drivers" and "LED Triggers" in sub-menu of "LED Support".
Besides, LEDS_GPIO_REGISTER is set to be bool but no description. Thus I
cannot find LEDS_GPIO_REGISTER config option while executing make menuconfig.
This patch also adds the description for LEDS_GPIO_REGISTER so the option can
be correctly displayed.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
drivers/leds/Kconfig | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig
index 23f0d5e..784f74f 100644
--- a/drivers/leds/Kconfig
+++ b/drivers/leds/Kconfig
@@ -15,7 +15,8 @@ config LEDS_CLASS
need this to do anything useful with LEDs. If unsure, say N.
config LEDS_GPIO_REGISTER
- bool
+ bool "LED GPIO Register Support"
+ depends on NEW_LEDS
help
This option provides the function gpio_led_register_device.
As this function is used by arch code it must not be compiled as a
--
1.7.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] leds: make LEDS_GPIO_REGISTER depend on NEW_LEDS
2011-05-28 9:52 [PATCH] leds: make LEDS_GPIO_REGISTER depend on NEW_LEDS Axel Lin
@ 2011-05-28 17:47 ` Uwe Kleine-König
2011-05-29 1:38 ` Axel Lin
0 siblings, 1 reply; 4+ messages in thread
From: Uwe Kleine-König @ 2011-05-28 17:47 UTC (permalink / raw)
To: Axel Lin; +Cc: linux-kernel, Richard Purdie, Andrew Morton, kernel
Hello Axel,
On Sat, May 28, 2011 at 05:52:56PM +0800, Axel Lin wrote:
> Commit 4440673a "leds: provide helper to register "leds-gpio" devices"
> adds "config LEDS_GPIO_REGISTER" in drivers/leds/Kconfig.
> However, config LEDS_GPIO_REGISTER does not depend on NEW_LEDS, while executing
> make menuconfig a side-effect is observed that the "LED drivers" and
> "LED Triggers" are now displayed at the same level of "LED Support".
> ( They was in sub-menu of "LED Support" before the commit. )
OK, this was unintended.
> This patch makes LEDS_GPIO_REGISTER depend on NEW_LEDS to correctly show
> "LED drivers" and "LED Triggers" in sub-menu of "LED Support".
This is wrong, LEDS_GPIO_REGISTER has to be available even when
NEW_LEDS=n.
> Besides, LEDS_GPIO_REGISTER is set to be bool but no description. Thus I
> cannot find LEDS_GPIO_REGISTER config option while executing make menuconfig.
And it's not supposed to be user-selectable because it only provides a
function used by arch code. And if nothing uses this function enabling
doesn't make sense. OTOH if arch code uses the function disabling
doesn't make sense as it would result in a build failure, so arch code
needs to select LEDS_GPIO_REGISTER and it doesn't need to be visible.
Below is a patch that fixes the layout problem but keeps the
functionality as before and intended.
-----8<-----
leds: move LEDS_GPIO_REGISTER out of menuconfig NEW_LEDS
From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Commit 4440673a "leds: provide helper to register "leds-gpio" devices"
broke the display of the NEW_LEDS menu as it didn't depend on NEW_LEDS
and so made "LED drivers" and "LED Triggers" appear at the same level as
"LED Support" instead of below it as it was before 4440673a.
Moving LEDS_GPIO_REGISTER out of the menuconfig NEW_LEDS fixes this
unintended side effect.
Reported-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
drivers/leds/Kconfig | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig
index 23f0d5e..12ca135 100644
--- a/drivers/leds/Kconfig
+++ b/drivers/leds/Kconfig
@@ -1,3 +1,10 @@
+config LEDS_GPIO_REGISTER
+ bool
+ help
+ This option provides the function gpio_led_register_device.
+ As this function is used by arch code it must not be compiled as a
+ module.
+
menuconfig NEW_LEDS
bool "LED Support"
help
@@ -14,13 +21,6 @@ config LEDS_CLASS
This option enables the led sysfs class in /sys/class/leds. You'll
need this to do anything useful with LEDs. If unsure, say N.
-config LEDS_GPIO_REGISTER
- bool
- help
- This option provides the function gpio_led_register_device.
- As this function is used by arch code it must not be compiled as a
- module.
-
if NEW_LEDS
comment "LED drivers"
--
1.7.2.5
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] leds: make LEDS_GPIO_REGISTER depend on NEW_LEDS
2011-05-28 17:47 ` Uwe Kleine-König
@ 2011-05-29 1:38 ` Axel Lin
2011-05-31 6:52 ` Uwe Kleine-König
0 siblings, 1 reply; 4+ messages in thread
From: Axel Lin @ 2011-05-29 1:38 UTC (permalink / raw)
To: Uwe Kleine-König; +Cc: linux-kernel, Richard Purdie, Andrew Morton, kernel
hi Uwe,
> Below is a patch that fixes the layout problem but keeps the
> functionality as before and intended.
>
> -----8<-----
> leds: move LEDS_GPIO_REGISTER out of menuconfig NEW_LEDS
>
> From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
>
> Commit 4440673a "leds: provide helper to register "leds-gpio" devices"
> broke the display of the NEW_LEDS menu as it didn't depend on NEW_LEDS
> and so made "LED drivers" and "LED Triggers" appear at the same level as
> "LED Support" instead of below it as it was before 4440673a.
>
> Moving LEDS_GPIO_REGISTER out of the menuconfig NEW_LEDS fixes this
> unintended side effect.
>
> Reported-by: Axel Lin <axel.lin@gmail.com>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
Your patch looks good.
Thanks,
Axel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] leds: make LEDS_GPIO_REGISTER depend on NEW_LEDS
2011-05-29 1:38 ` Axel Lin
@ 2011-05-31 6:52 ` Uwe Kleine-König
0 siblings, 0 replies; 4+ messages in thread
From: Uwe Kleine-König @ 2011-05-31 6:52 UTC (permalink / raw)
To: Axel Lin; +Cc: linux-kernel, Richard Purdie, Andrew Morton, kernel
On Sun, May 29, 2011 at 09:38:34AM +0800, Axel Lin wrote:
> hi Uwe,
> > Below is a patch that fixes the layout problem but keeps the
> > functionality as before and intended.
> >
> > -----8<-----
> > leds: move LEDS_GPIO_REGISTER out of menuconfig NEW_LEDS
> >
> > From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> >
> > Commit 4440673a "leds: provide helper to register "leds-gpio" devices"
> > broke the display of the NEW_LEDS menu as it didn't depend on NEW_LEDS
> > and so made "LED drivers" and "LED Triggers" appear at the same level as
> > "LED Support" instead of below it as it was before 4440673a.
> >
> > Moving LEDS_GPIO_REGISTER out of the menuconfig NEW_LEDS fixes this
> > unintended side effect.
> >
> > Reported-by: Axel Lin <axel.lin@gmail.com>
> > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > ---
> Your patch looks good.
Richard, thoughts? Andrew, do you take my patch provided that Richard is
OK with it?
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-05-31 6:52 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-28 9:52 [PATCH] leds: make LEDS_GPIO_REGISTER depend on NEW_LEDS Axel Lin
2011-05-28 17:47 ` Uwe Kleine-König
2011-05-29 1:38 ` Axel Lin
2011-05-31 6:52 ` Uwe Kleine-König
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox