linux-kbuild.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Kconfig: fix problem in HID menu
@ 2009-05-17 15:56 Krzysztof Helt
  2009-05-18  8:21 ` Jiri Slaby
  0 siblings, 1 reply; 4+ messages in thread
From: Krzysztof Helt @ 2009-05-17 15:56 UTC (permalink / raw)
  To: linux-kbuild; +Cc: LKLM

From: Krzysztof Helt <krzysztof.h1@wp.pl>

Following syntax does not work properly if there is an options FOO2 depending on the FOO:

config FOO
	tristate "Foo" if EMBEDDED
	depends on FUD
	default !EMBEDDED

config FOO2
	bool "Foo2"
	depends on FOO

If the EMBEDDED is not selected the FOO option is selected
and it cannot be unselected.

The change of the FOO definition:

config FOO
	tristate "Foo" 
	depends on EMBEDDED && FUD
	default !EMBEDDED

fixes the issue.

This is likely a bug in Kconfig tool.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
---

diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
index 7e67dcb..c52204d 100644
--- a/drivers/hid/Kconfig
+++ b/drivers/hid/Kconfig
@@ -153,8 +153,8 @@ config HID_KENSINGTON
 	Support for Kensington Slimblade Trackball.
 
 config HID_LOGITECH
-	tristate "Logitech" if EMBEDDED
-	depends on USB_HID
+	tristate "Logitech"
+	depends on EMBEDDED && USB_HID
 	default !EMBEDDED
 	---help---
 	Support for Logitech devices that are not fully compliant with HID standard.
@@ -205,8 +205,8 @@ config HID_NTRIG
 	Support for N-Trig touch screen.
 
 config HID_PANTHERLORD
-	tristate "Pantherlord devices support" if EMBEDDED
-	depends on USB_HID
+	tristate "Pantherlord devices support"
+	depends on EMBEDDED && USB_HID
 	default !EMBEDDED
 	---help---
 	Support for PantherLord/GreenAsia based device support.

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: Kconfig: fix problem in HID menu
  2009-05-17 15:56 Kconfig: fix problem in HID menu Krzysztof Helt
@ 2009-05-18  8:21 ` Jiri Slaby
  2009-05-18  8:49   ` Krzysztof Helt
  0 siblings, 1 reply; 4+ messages in thread
From: Jiri Slaby @ 2009-05-18  8:21 UTC (permalink / raw)
  To: Krzysztof Helt; +Cc: linux-kbuild, LKLM, Jiri Kosina

On 05/17/2009 05:56 PM, Krzysztof Helt wrote:
> Following syntax does not work properly if there is an options FOO2 depending on the FOO:
> 
> config FOO
> 	tristate "Foo" if EMBEDDED
> 	depends on FUD
> 	default !EMBEDDED
> 
> config FOO2
> 	bool "Foo2"
> 	depends on FOO
> 
> If the EMBEDDED is not selected the FOO option is selected
> and it cannot be unselected.

Uhuh, but that's correct behaviour. We don't want to bother user with
tons of drivers unless he is compiling for embedded. Or am I missing
something?

> The change of the FOO definition:
> 
> config FOO
> 	tristate "Foo" 
> 	depends on EMBEDDED && FUD
> 	default !EMBEDDED
> 
> fixes the issue.

This does something different. You offer regular user to turn it off and
defaults to n for embedded. This is not what we want, I suppose.

> This is likely a bug in Kconfig tool.

In that case, you want to fix the tool, not the configs.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Kconfig: fix problem in HID menu
  2009-05-18  8:21 ` Jiri Slaby
@ 2009-05-18  8:49   ` Krzysztof Helt
  2009-05-18  8:56     ` Jiri Slaby
  0 siblings, 1 reply; 4+ messages in thread
From: Krzysztof Helt @ 2009-05-18  8:49 UTC (permalink / raw)
  To: Jiri Slaby; +Cc: linux-kbuild, LKLM, Jiri Kosina

On Mon, 18 May 2009 10:21:25 +0200
Jiri Slaby <jirislaby@gmail.com> wrote:

> On 05/17/2009 05:56 PM, Krzysztof Helt wrote:
> > Following syntax does not work properly if there is an options FOO2 depending on the FOO:
> > 
> > config FOO
> > 	tristate "Foo" if EMBEDDED
> > 	depends on FUD
> > 	default !EMBEDDED
> > 
> > config FOO2
> > 	bool "Foo2"
> > 	depends on FOO
> > 
> > If the EMBEDDED is not selected the FOO option is selected
> > and it cannot be unselected.
> 
> Uhuh, but that's correct behaviour. We don't want to bother user with
> tons of drivers unless he is compiling for embedded. Or am I missing
> something?
> 

I see now. I was little surprised by this. Please ignore my patch.

Regards,
Krzysztof

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Kconfig: fix problem in HID menu
  2009-05-18  8:49   ` Krzysztof Helt
@ 2009-05-18  8:56     ` Jiri Slaby
  0 siblings, 0 replies; 4+ messages in thread
From: Jiri Slaby @ 2009-05-18  8:56 UTC (permalink / raw)
  To: Krzysztof Helt; +Cc: linux-kbuild, LKLM, Jiri Kosina

On 05/18/2009 10:49 AM, Krzysztof Helt wrote:
> I see now. I was little surprised by this.

There was a thread where we decided to do that this way. I can't find it
now, I didn't give the searching much time though.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-05-18  8:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-17 15:56 Kconfig: fix problem in HID menu Krzysztof Helt
2009-05-18  8:21 ` Jiri Slaby
2009-05-18  8:49   ` Krzysztof Helt
2009-05-18  8:56     ` Jiri Slaby

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).