[PATCH] staging: unisys: Rework Kconfig dependencies

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I find the Kconfig dependencies of the various Unisys drivers rather
confusing. Due to the dependencies, you must select the drivers one by
one to see the following ones. So if you are looking for a specific
driver, it is not visible by default. And if you don't know exactly
what you need, it's even worse as you don't know what is available.

In a case like this with several helper drivers and many dependencies,
I think it makes more sense to list all the drivers at first, and use
select statements to fulfill the dependencies for the user.

As a nice side effect, it avoids the weird indentation, which was
technically correct but still somewhat confusing.

I also dropped the dependencies on HAS_IOMEM, as the whole driver set
is for X86_64 only anyway which always has HAS_IOMEM set. And I
dropped the redundant dependencies on UNISYSSPAR as all drivers are
already inside an "if UNISYSSPAR" block.

Signed-off-by: Jean Delvare <jdelvare@xxxxxxx>
Cc: Benjamin Romer <benjamin.romer@xxxxxxxxxx>
Cc: David Kershner <david.kershner@xxxxxxxxxx>
Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
This is an humble proposal if you like it. I don't use the driver
myself, I don't even know what it is for ;-)

I am also wondering if all these options really need to be selectable
individually by the user. Some seem to be helper modules which could
be hidden now that they are selected automatically?

 drivers/staging/unisys/uislib/Kconfig       |    2 +-
 drivers/staging/unisys/virthba/Kconfig      |    5 ++++-
 drivers/staging/unisys/virtpci/Kconfig      |    2 +-
 drivers/staging/unisys/visorchannel/Kconfig |    2 +-
 drivers/staging/unisys/visorchipset/Kconfig |    3 ++-
 drivers/staging/unisys/visorutil/Kconfig    |    1 -
 6 files changed, 9 insertions(+), 6 deletions(-)

--- linux-3.20-rc0.orig/drivers/staging/unisys/uislib/Kconfig	2015-02-20 17:24:48.995000538 +0100
+++ linux-3.20-rc0/drivers/staging/unisys/uislib/Kconfig	2015-02-21 13:08:07.472419437 +0100
@@ -4,7 +4,7 @@
 
 config UNISYS_UISLIB
 	tristate "Unisys uislib driver"
-	depends on UNISYSSPAR && UNISYS_VISORCHIPSET && HAS_IOMEM
+	select UNISYS_VISORCHIPSET
 	---help---
 	If you say Y here, you will enable the Unisys uislib driver.
 
--- linux-3.20-rc0.orig/drivers/staging/unisys/virthba/Kconfig	2015-02-20 17:24:48.998000601 +0100
+++ linux-3.20-rc0/drivers/staging/unisys/virthba/Kconfig	2015-02-20 19:49:17.037919949 +0100
@@ -4,7 +4,10 @@
 
 config UNISYS_VIRTHBA
 	tristate "Unisys virthba driver"
-	depends on UNISYSSPAR && UNISYS_VISORCHIPSET && UNISYS_UISLIB && UNISYS_VIRTPCI && SCSI
+	depends on SCSI
+	select UNISYS_VISORCHIPSET
+	select UNISYS_UISLIB
+	select UNISYS_VIRTPCI
 	---help---
 	If you say Y here, you will enable the Unisys virthba driver.
 
--- linux-3.20-rc0.orig/drivers/staging/unisys/virtpci/Kconfig	2015-02-09 03:54:22.000000000 +0100
+++ linux-3.20-rc0/drivers/staging/unisys/virtpci/Kconfig	2015-02-20 19:48:51.558381645 +0100
@@ -4,7 +4,7 @@
 
 config UNISYS_VIRTPCI
 	tristate "Unisys virtpci driver"
-	depends on UNISYSSPAR && UNISYS_UISLIB
+	select UNISYS_UISLIB
 	---help---
 	If you say Y here, you will enable the Unisys virtpci driver.
 
--- linux-3.20-rc0.orig/drivers/staging/unisys/visorchannel/Kconfig	2015-02-09 03:54:22.000000000 +0100
+++ linux-3.20-rc0/drivers/staging/unisys/visorchannel/Kconfig	2015-02-20 19:48:25.291826710 +0100
@@ -4,7 +4,7 @@
 
 config UNISYS_VISORCHANNEL
 	tristate "Unisys visorchannel driver"
-	depends on UNISYSSPAR && UNISYS_VISORUTIL
+	select UNISYS_VISORUTIL
 	---help---
 	If you say Y here, you will enable the Unisys visorchannel driver.
 
--- linux-3.20-rc0.orig/drivers/staging/unisys/visorchipset/Kconfig	2015-02-09 03:54:22.000000000 +0100
+++ linux-3.20-rc0/drivers/staging/unisys/visorchipset/Kconfig	2015-02-21 13:08:09.945468810 +0100
@@ -4,7 +4,8 @@
 
 config UNISYS_VISORCHIPSET
 	tristate "Unisys visorchipset driver"
-	depends on UNISYSSPAR && UNISYS_VISORUTIL && UNISYS_VISORCHANNEL && HAS_IOMEM
+	select UNISYS_VISORUTIL
+	select UNISYS_VISORCHANNEL
 	---help---
 	If you say Y here, you will enable the Unisys visorchipset driver.
 
--- linux-3.20-rc0.orig/drivers/staging/unisys/visorutil/Kconfig	2015-02-09 03:54:22.000000000 +0100
+++ linux-3.20-rc0/drivers/staging/unisys/visorutil/Kconfig	2015-02-21 13:08:14.217554108 +0100
@@ -4,7 +4,6 @@
 
 config UNISYS_VISORUTIL
 	tristate "Unisys visorutil driver"
-	depends on UNISYSSPAR && HAS_IOMEM
 	---help---
 	If you say Y here, you will enable the Unisys visorutil driver.
 

-- 
Jean Delvare
SUSE L3 Support
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux