Skip to contentSkip to conversation

iforce: simplify Kconfig depends

PATCH In review H Hartley Sweeten 2 participants 2 messages Aug 18, 2010 – Aug 19, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iforce: simplify Kconfig depends

The depends on for JOYSTICK_IFORCE is already handled in drivers/input/Kconfig and drivers/input/joystick/Kconfig.

Remove the depends on JOYSTICK_IFORCE for the *_USB and *_232 connections by wrapping them in an if/endif block. The second depends on check is still needed to prevent the iforce driver from being built-in while the connection is a module.

---

Should the connection depends on be changed to a select similar to the other joystick drivers?

drivers/input/joystick/iforce/Kconfig +5 -3
index 8fde22a..d5fa68d 100644
@@ -3,7 +3,6 @@
 #
 config JOYSTICK_IFORCE
 	tristate "I-Force devices"
-	depends on INPUT && INPUT_JOYSTICK
 	help
 	  Say Y here if you have an I-Force joystick or steering wheel
 
@@ -12,16 +11,18 @@ config JOYSTICK_IFORCE
 	  To compile this driver as a module, choose M here: the
 	  module will be called iforce.
 
+if JOYSTICK_IFORCE
+
 config JOYSTICK_IFORCE_USB
 	bool "I-Force USB joysticks and wheels"
-	depends on JOYSTICK_IFORCE && (JOYSTICK_IFORCE=m || USB=y) && USB
+	depends on (JOYSTICK_IFORCE=m || USB=y) && USB
 	help
 	  Say Y here if you have an I-Force joystick or steering wheel
 	  connected to your USB port.
 
 config JOYSTICK_IFORCE_232
 	bool "I-Force Serial joysticks and wheels"
-	depends on JOYSTICK_IFORCE && (JOYSTICK_IFORCE=m || SERIO=y) && SERIO
+	depends on (JOYSTICK_IFORCE=m || SERIO=y) && SERIO
 	help
 	  Say Y here if you have an I-Force joystick or steering wheel
 	  connected to your serial (COM) port.
@@ -30,3 +31,4 @@ config JOYSTICK_IFORCE_232
 	  <file:Documentation/input/joystick.txt>
 	  and <file:Documentation/input/ff.txt>.
 
+endif
maintainer
#1 lore raw

Hi Harvey,

Quoted 10 lines · H Hartley Sweeten

The depends on for JOYSTICK_IFORCE is already handled in drivers/input/Kconfig and drivers/input/joystick/Kconfig.

Remove the depends on JOYSTICK_IFORCE for the *_USB and *_232 connections by wrapping them in an if/endif block. The second depends on check is still needed to prevent the iforce driver from being built-in while the connection is a module.

I have something in the local queus that reworks iforce a bit, I'll hold on to the patch and see if it is still makes sense when I done with my changes.

Thanks.

Quoted 43 lines

---

Should the connection depends on be changed to a select similar to the other joystick drivers?

drivers/input/joystick/iforce/Kconfig +5 -3
index 8fde22a..d5fa68d 100644
@@ -3,7 +3,6 @@
 #
 config JOYSTICK_IFORCE
 	tristate "I-Force devices"
-	depends on INPUT && INPUT_JOYSTICK
 	help
 	  Say Y here if you have an I-Force joystick or steering wheel
 
@@ -12,16 +11,18 @@ config JOYSTICK_IFORCE
 	  To compile this driver as a module, choose M here: the
 	  module will be called iforce.
 
+if JOYSTICK_IFORCE
+
 config JOYSTICK_IFORCE_USB
 	bool "I-Force USB joysticks and wheels"
-	depends on JOYSTICK_IFORCE && (JOYSTICK_IFORCE=m || USB=y) && USB
+	depends on (JOYSTICK_IFORCE=m || USB=y) && USB
 	help
 	  Say Y here if you have an I-Force joystick or steering wheel
 	  connected to your USB port.
 
 config JOYSTICK_IFORCE_232
 	bool "I-Force Serial joysticks and wheels"
-	depends on JOYSTICK_IFORCE && (JOYSTICK_IFORCE=m || SERIO=y) && SERIO
+	depends on (JOYSTICK_IFORCE=m || SERIO=y) && SERIO
 	help
 	  Say Y here if you have an I-Force joystick or steering wheel
 	  connected to your serial (COM) port.
@@ -30,3 +31,4 @@ config JOYSTICK_IFORCE_232
 	  <file:Documentation/input/joystick.txt>
 	  and <file:Documentation/input/ff.txt>.
 
+endif
Signature · 1 line
Dmitry