Browse Source

Input: synaptics-rmi4 - use Kconfig "if" to express dependency

There is no need to repeat "depends on RMI4_CORE" on every bit of RMI4
support, we can guard all of them at once with "if RMI4_CORE".

Also use tabs for F03 indentation.

Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Dmitry Torokhov 8 năm trước cách đây
mục cha
commit
b29c139a15
1 tập tin đã thay đổi với 12 bổ sung16 xóa
  1. 12 16
      drivers/input/rmi4/Kconfig

+ 12 - 16
drivers/input/rmi4/Kconfig

@@ -9,9 +9,11 @@ config RMI4_CORE
 
 
 	  If unsure, say Y.
 	  If unsure, say Y.
 
 
+if RMI4_CORE
+
 config RMI4_I2C
 config RMI4_I2C
 	tristate "RMI4 I2C Support"
 	tristate "RMI4 I2C Support"
-	depends on RMI4_CORE && I2C
+	depends on I2C
 	help
 	help
 	  Say Y here if you want to support RMI4 devices connected to an I2C
 	  Say Y here if you want to support RMI4 devices connected to an I2C
 	  bus.
 	  bus.
@@ -20,7 +22,7 @@ config RMI4_I2C
 
 
 config RMI4_SPI
 config RMI4_SPI
 	tristate "RMI4 SPI Support"
 	tristate "RMI4 SPI Support"
-	depends on RMI4_CORE && SPI
+	depends on SPI
 	help
 	help
 	  Say Y here if you want to support RMI4 devices connected to a SPI
 	  Say Y here if you want to support RMI4 devices connected to a SPI
 	  bus.
 	  bus.
@@ -29,7 +31,7 @@ config RMI4_SPI
 
 
 config RMI4_SMB
 config RMI4_SMB
 	tristate "RMI4 SMB Support"
 	tristate "RMI4 SMB Support"
-	depends on RMI4_CORE && I2C
+	depends on I2C
 	help
 	help
 	  Say Y here if you want to support RMI4 devices connected to an SMB
 	  Say Y here if you want to support RMI4 devices connected to an SMB
 	  bus.
 	  bus.
@@ -40,23 +42,20 @@ config RMI4_SMB
 	  called rmi_smbus.
 	  called rmi_smbus.
 
 
 config RMI4_F03
 config RMI4_F03
-        bool "RMI4 Function 03 (PS2 Guest)"
-	depends on RMI4_CORE
+	bool "RMI4 Function 03 (PS2 Guest)"
 	depends on SERIO=y || RMI4_CORE=SERIO
 	depends on SERIO=y || RMI4_CORE=SERIO
-        help
-          Say Y here if you want to add support for RMI4 function 03.
+	help
+	  Say Y here if you want to add support for RMI4 function 03.
 
 
-          Function 03 provides PS2 guest support for RMI4 devices. This
-          includes support for TrackPoints on TouchPads.
+	  Function 03 provides PS2 guest support for RMI4 devices. This
+	  includes support for TrackPoints on TouchPads.
 
 
 config RMI4_2D_SENSOR
 config RMI4_2D_SENSOR
 	bool
 	bool
-	depends on RMI4_CORE
 
 
 config RMI4_F11
 config RMI4_F11
 	bool "RMI4 Function 11 (2D pointing)"
 	bool "RMI4 Function 11 (2D pointing)"
 	select RMI4_2D_SENSOR
 	select RMI4_2D_SENSOR
-	depends on RMI4_CORE
 	help
 	help
 	  Say Y here if you want to add support for RMI4 function 11.
 	  Say Y here if you want to add support for RMI4 function 11.
 
 
@@ -67,7 +66,6 @@ config RMI4_F11
 config RMI4_F12
 config RMI4_F12
 	bool "RMI4 Function 12 (2D pointing)"
 	bool "RMI4 Function 12 (2D pointing)"
 	select RMI4_2D_SENSOR
 	select RMI4_2D_SENSOR
-	depends on RMI4_CORE
 	help
 	help
 	  Say Y here if you want to add support for RMI4 function 12.
 	  Say Y here if you want to add support for RMI4 function 12.
 
 
@@ -77,7 +75,6 @@ config RMI4_F12
 
 
 config RMI4_F30
 config RMI4_F30
 	bool "RMI4 Function 30 (GPIO LED)"
 	bool "RMI4 Function 30 (GPIO LED)"
-	depends on RMI4_CORE
 	help
 	help
 	  Say Y here if you want to add support for RMI4 function 30.
 	  Say Y here if you want to add support for RMI4 function 30.
 
 
@@ -86,7 +83,6 @@ config RMI4_F30
 
 
 config RMI4_F34
 config RMI4_F34
 	bool "RMI4 Function 34 (Device reflash)"
 	bool "RMI4 Function 34 (Device reflash)"
-	depends on RMI4_CORE
 	select FW_LOADER
 	select FW_LOADER
 	help
 	help
 	  Say Y here if you want to add support for RMI4 function 34.
 	  Say Y here if you want to add support for RMI4 function 34.
@@ -97,7 +93,6 @@ config RMI4_F34
 
 
 config RMI4_F54
 config RMI4_F54
 	bool "RMI4 Function 54 (Analog diagnostics)"
 	bool "RMI4 Function 54 (Analog diagnostics)"
-	depends on RMI4_CORE
 	depends on VIDEO_V4L2=y || (RMI4_CORE=m && VIDEO_V4L2=m)
 	depends on VIDEO_V4L2=y || (RMI4_CORE=m && VIDEO_V4L2=m)
 	select VIDEOBUF2_VMALLOC
 	select VIDEOBUF2_VMALLOC
 	select RMI4_F55
 	select RMI4_F55
@@ -109,9 +104,10 @@ config RMI4_F54
 
 
 config RMI4_F55
 config RMI4_F55
 	bool "RMI4 Function 55 (Sensor tuning)"
 	bool "RMI4 Function 55 (Sensor tuning)"
-	depends on RMI4_CORE
 	help
 	help
 	  Say Y here if you want to add support for RMI4 function 55
 	  Say Y here if you want to add support for RMI4 function 55
 
 
 	  Function 55 provides access to the RMI4 touch sensor tuning
 	  Function 55 provides access to the RMI4 touch sensor tuning
 	  mechanism.
 	  mechanism.
+
+endif # RMI_CORE