Skip to contentSkip to conversation

leds: fix the menuconfig being wrongly displayed

PATCH In review Eric Miao 2 participants 3 messages Jun 2, 2011 LED

lore
Share & tools
lore

Eric Miao

author
#0 lore raw

PATCH 1/1 leds: fix the menuconfig being wrongly displayed

From: Eric Miao <[email protected]>

Seems when a config option does not have a dependency of the menuconfig, it messes the display of the rest configs, even if it's a hidden one.

Cc Richard Purdie <[email protected]>
---
 drivers/leds/Kconfig |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/leds/Kconfig +2 -2
index 23f0d5e..7066820 100644
@@ -7,6 +7,8 @@ menuconfig NEW_LEDS
 	  This is not related to standard keyboard LEDs which are controlled
 	  via the input system.
 
+if NEW_LEDS
+
 config LEDS_CLASS
 	bool "LED Class Support"
 	depends on NEW_LEDS
@@ -21,8 +23,6 @@ config LEDS_GPIO_REGISTER
 	  As this function is used by arch code it must not be compiled as a
 	  module.
 
-if NEW_LEDS
-
 comment "LED drivers"
 
 config LEDS_88PM860X
Signature · 1 line
1.7.4.1
#1 lore raw
Quoted 16 lines · Eric Miao

From: Eric Miao <[email protected]>

Seems when a config option does not have a dependency of the menuconfig, it messes the display of the rest configs, even if it's a hidden one.

Cc Richard Purdie <[email protected]>
---
 drivers/leds/Kconfig |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/leds/Kconfig +0 -0
index 23f0d5e..7066820 100644

drivers/leds/Kconfig menuconfig NEW_LEDS · line 14

Quoted 8 lines
drivers/leds/Kconfig +2 -0
@@ -7,6 +7,8 @@ menuconfig NEW_LEDS
 	  This is not related to standard keyboard LEDs which are controlled
 	  via the input system.
 
+if NEW_LEDS
+
 config LEDS_CLASS
 	bool "LED Class Support"
 	depends on NEW_LEDS

Having added that 'if', do we still need that 'depends'?

author
#2 lore raw
Quoted 20 lines · On Thu, Jun 2, 2011 at 8:57 PM, <[email protected]> wrote:
Quoted 19 lines · Eric Miao

From: Eric Miao <[email protected]>

Seems when a config option does not have a dependency of the menuconfig, it messes the display of the rest configs, even if it's a hidden one.

Cc Richard Purdie <[email protected]>

---
 drivers/leds/Kconfig |    4 ++--

 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/leds/Kconfig +0 -0
index 23f0d5e..7066820 100644
@@ -7,6 +7,8 @@ menuconfig NEW_LEDS

        This is not related to standard keyboard LEDs which are controlled via the input system.

Quoted 8 lines
Quoted 5 lines
drivers/leds/Kconfig +2 -0
+if NEW_LEDS
+

 config LEDS_CLASS
      bool "LED Class Support"
      depends on NEW_LEDS

Having added that 'if', do we still need that 'depends'?

I don't think so. We can definitely remove it. Updated as follows:

drivers/leds/Kconfig +2 -3
index 23f0d5e..1251e6a 100644
@@ -7,9 +7,10 @@ menuconfig NEW_LEDS
          This is not related to standard keyboard LEDs which are controlled
          via the input system.
 
+if NEW_LEDS
+
 config LEDS_CLASS
        bool "LED Class Support"
-       depends on NEW_LEDS
        help
          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.
@@ -21,8 +22,6 @@ config LEDS_GPIO_REGISTER
          As this function is used by arch code it must not be compiled as a
          module.
 
-if NEW_LEDS
-
 comment "LED drivers"
 
 config LEDS_88PM860X