Skip to contentSkip to conversation

staging: comedi: Kconfig: menuconfig options should be bool not tristate

PATCH Superseded H Hartley Sweeten 3 participants 8 messages Jun 15, 2012 – Jun 19, 2012 Staging

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 staging: comedi: Kconfig: menuconfig options should be bool not tristate

The menuconfig options to enable the misc, isa, pci, pcmcia, and usb comedi driver selections should be bool not tristate. They don't directly affect the building of the kernel they just allow other options to be selected.

Cc Ian Abbott <[email protected]>
Cc Frank Mori Hess <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
---
 drivers/staging/comedi/Kconfig |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
drivers/staging/comedi/Kconfig +5 -5
index 2ca7f08..88ef0c7 100644
@@ -33,7 +33,7 @@ config COMEDI_DEFAULT_BUF_MAXSIZE_KB
 	  channels running at 100 kHz has 2-4 seconds of buffer.
 
 menuconfig COMEDI_MISC_DRIVERS
-	tristate "Comedi misc drivers"
+	bool "Comedi misc drivers"
 	---help---
 	  Enable comedi misc drivers to be built
 
@@ -100,7 +100,7 @@ config COMEDI_SKEL
 endif # COMEDI_MISC_DRIVERS
 
 menuconfig COMEDI_ISA_DRIVERS
-	tristate "Comedi ISA and PC/104 drivers"
+	bool "Comedi ISA and PC/104 drivers"
 	depends on ISA
 	---help---
 	  Enable comedi ISA and PC/104 drivers to be built
@@ -540,7 +540,7 @@ config COMEDI_POC
 endif # COMEDI_ISA_DRIVERS
 
 menuconfig COMEDI_PCI_DRIVERS
-	tristate "Comedi PCI drivers"
+	bool "Comedi PCI drivers"
 	depends on PCI
 	---help---
 	  Enable comedi PCI drivers to be built
@@ -1096,7 +1096,7 @@ config COMEDI_SSV_DNP
 endif # COMEDI_PCI_DRIVERS
 
 menuconfig COMEDI_PCMCIA_DRIVERS
-	tristate "Comedi PCMCIA drivers"
+	bool "Comedi PCMCIA drivers"
 	depends on PCMCIA
 	---help---
 	  Enable comedi PCMCIA and PCCARD drivers to be built
@@ -1179,7 +1179,7 @@ config COMEDI_QUATECH_DAQP_CS
 endif # COMEDI_PCMCIA_DRIVERS
 
 menuconfig COMEDI_USB_DRIVERS
-	tristate "Comedi USB drivers"
+	bool "Comedi USB drivers"
 	depends on USB
 	---help---
 	  Enable comedi USB drivers to be built
Signature · 1 line
1.7.7
maintainer
#1 lore raw
Quoted 11 lines · H Hartley Sweeten

The menuconfig options to enable the misc, isa, pci, pcmcia, and usb comedi driver selections should be bool not tristate. They don't directly affect the building of the kernel they just allow other options to be selected.

Cc Ian Abbott <[email protected]>
Cc Frank Mori Hess <[email protected]>
---
 drivers/staging/comedi/Kconfig |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

This patch breaks the build for me with lots of the following errors:
ERROR: "subdev_8255_init" [drivers/staging/comedi/drivers/adl_pci7296.ko] undefined!
ERROR: "subdev_8255_cleanup" [drivers/staging/comedi/drivers/adl_pci7296.ko] undefined!

So I can't take it, or the other 4 patches in this series, sorry.

Care to redo it?

thanks,

greg k-h

#2 lore raw
Quoted 13 lines · Greg KH
Quoted 11 lines · H Hartley Sweeten

The menuconfig options to enable the misc, isa, pci, pcmcia, and usb comedi driver selections should be bool not tristate. They don't directly affect the building of the kernel they just allow other options to be selected.

Cc Ian Abbott <[email protected]>
Cc Frank Mori Hess <[email protected]>
---
 drivers/staging/comedi/Kconfig |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
Quoted 7 lines

This patch breaks the build for me with lots of the following errors:
ERROR: "subdev_8255_init" [drivers/staging/comedi/drivers/adl_pci7296.ko] undefined!
ERROR: "subdev_8255_cleanup" [drivers/staging/comedi/drivers/adl_pci7296.ko] undefined!

So I can't take it, or the other 4 patches in this series, sorry.

Care to redo it?

Hmm.. Builds fine for me.

I'll work out the issue and re-posty the patches.

Thanks,
Hartley

#3 lore raw
In reply to Greg KH
Quoted 13 lines · Greg KH
Quoted 11 lines · H Hartley Sweeten

The menuconfig options to enable the misc, isa, pci, pcmcia, and usb comedi driver selections should be bool not tristate. They don't directly affect the building of the kernel they just allow other options to be selected.

Cc Ian Abbott <[email protected]>
Cc Frank Mori Hess <[email protected]>
---
 drivers/staging/comedi/Kconfig |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
Quoted 3 lines

This patch breaks the build for me with lots of the following errors:
ERROR: "subdev_8255_init" [drivers/staging/comedi/drivers/adl_pci7296.ko] undefined!
ERROR: "subdev_8255_cleanup" [drivers/staging/comedi/drivers/adl_pci7296.ko] undefined!

Strange. I just applied only this patch and the build still works on my system. I don't see any reason why this change of the menuconfig options from tristate to bool would cause the problem you are seeing.

I do see a problem in the Kconfig for the adl_pci7296 driver.

Based on the error message above, it requires COMEDI_8255. But that option is not listed as a depends or select. I noticed a couple other comedi drivers with the same issue.

Regards,
Hartley

maintainer
#4 lore raw
Quoted 23 lines · H Hartley Sweeten
Quoted 13 lines · Greg KH
Quoted 11 lines · H Hartley Sweeten

The menuconfig options to enable the misc, isa, pci, pcmcia, and usb comedi driver selections should be bool not tristate. They don't directly affect the building of the kernel they just allow other options to be selected.

Cc Ian Abbott <[email protected]>
Cc Frank Mori Hess <[email protected]>
---
 drivers/staging/comedi/Kconfig |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
Quoted 3 lines

This patch breaks the build for me with lots of the following errors:
ERROR: "subdev_8255_init" [drivers/staging/comedi/drivers/adl_pci7296.ko] undefined!
ERROR: "subdev_8255_cleanup" [drivers/staging/comedi/drivers/adl_pci7296.ko] undefined!

Strange. I just applied only this patch and the build still works on my system. I don't see any reason why this change of the menuconfig options from tristate to bool would cause the problem you are seeing.

Quoted 5 lines

I do see a problem in the Kconfig for the adl_pci7296 driver.

Based on the error message above, it requires COMEDI_8255. But that option is not listed as a depends or select. I noticed a couple other comedi drivers with the same issue.

Below is the .config I use. Apply your patch, and select 'y' for the different options it asks for when running 'make oldconfig' and then see the build errors.

#5 lore raw
Quoted 3 lines · Greg KH

Below is the .config I use. Apply your patch, and select 'y' for the different options it asks for when running 'make oldconfig' and then see the build errors.

Ok. It looks like the patch below should fix it. Can you test it?

Regards,
Hartley

Quoted 1 line

From 41080f5af022a13e96bad3a5818e8cd816a7a925 Mon Sep 17 00:00:00 2001

From: H Hartley Sweeten <[email protected]>
Date: Mon, 18 Jun 2012 17:45:51 -0700
Subject: [PATCH] staging: comedi: Kconfig: fix drivers that require the 8255 driver

Many of the comedi drivers require the 8255 driver for various subdevices. The Makefile currently uses CONFIG_COMEDI_PCI_DRIVERS to make sure the 8255 driver is compiled. The Kconfig help for that option says that this option does not directly affect the kernel.

Fix this by adding the proper 'select COMEDI_8255' where needed.

Also, remove two cases where the drivers don't actually need the 8255 support.

Cc Ian Abbott <[email protected]>
Cc Frank Mori Hess <[email protected]>
Cc Greg Kroah-hartman <[email protected]>
---
 drivers/staging/comedi/Kconfig          | 3 +--
 drivers/staging/comedi/drivers/Makefile | 1 -
 2 files changed, 1 insertion(+), 3 deletions(-)
drivers/staging/comedi/Kconfig +1 -2
index 2ca7f08..198a55d 100644
@@ -672,7 +672,6 @@ config COMEDI_ADDI_APCI_3XXX
 
 config COMEDI_ADL_PCI6208
 	tristate "ADLink PCI-6208A support"
-	select COMEDI_8255
 	---help---
 	  Enable support for ADLink PCI-6208A cards
 
@@ -689,6 +688,7 @@ config COMEDI_ADL_PCI7230
 
 config COMEDI_ADL_PCI7296
 	tristate "ADLink PCI-7296 96 ch. digital io board support"
+	select COMED_8255
 	---help---
 	  Enable support for ADlink PCI-7296 96 ch. digital io board support
 
@@ -1061,7 +1061,6 @@ config COMEDI_NI_PCIMIO
 
 config COMEDI_RTD520
 	tristate "Real Time Devices PCI4520/DM7520 support"
-	select COMEDI_8255
 	---help---
 	  Enable support for Real Time Devices PCI4520/DM7520
 
drivers/staging/comedi/drivers/Makefile +0 -1
index 170da60..513469d 100644
@@ -55,7 +55,6 @@ obj-$(CONFIG_COMEDI_MULTIQ3)		+= multiq3.o
 obj-$(CONFIG_COMEDI_POC)		+= poc.o
 
 # Comedi PCI drivers
-obj-$(CONFIG_COMEDI_PCI_DRIVERS)	+= 8255.o
 obj-$(CONFIG_COMEDI_ADDI_APCI_035)	+= addi_apci_035.o
 obj-$(CONFIG_COMEDI_ADDI_APCI_1032)	+= addi_apci_1032.o
 obj-$(CONFIG_COMEDI_ADDI_APCI_1500)	+= addi_apci_1500.o
Signature · 1 line
1.7.11
#6 lore raw

drivers/staging/comedi/Kconfig config COMEDI_ADL_PCI7230 · line 693

Quoted 11 lines · H Hartley Sweeten
Quoted 3 lines · Greg KH

Below is the .config I use. Apply your patch, and select 'y' for the different options it asks for when running 'make oldconfig' and then see the build errors.

Ok. It looks like the patch below should fix it. Can you test it?
config COMEDI_ADL_PCI7296
tristate "ADLink PCI-7296 96 ch. digital io board support"

drivers/staging/comedi/Kconfig +1 -0
+	select COMED_8255
  	---help---
  	  Enable support for ADlink PCI-7296 96 ch. digital io board support

That one has a typo bug.

Signature · 2 lines
-=( Ian Abbott @ MEV Ltd.    E-mail: <[email protected]>        )=-
-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587         )=-
#7 lore raw
Quoted 6 lines · Ian Abbott
Quoted 5 lines · H Hartley Sweeten
Quoted 3 lines · Greg KH

Below is the .config I use. Apply your patch, and select 'y' for the different options it asks for when running 'make oldconfig' and then see the build errors.

Quoted 8 lines

drivers/staging/comedi/Kconfig config COMEDI_ADL_PCI7230 · line 693

Quoted 6 lines

Ok. It looks like the patch below should fix it. Can you test it?
config COMEDI_ADL_PCI7296
tristate "ADLink PCI-7296 96 ch. digital io board support"

drivers/staging/comedi/Kconfig +1 -0
+	select COMED_8255
  	---help---
  	  Enable support for ADlink PCI-7296 96 ch. digital io board support

That one has a typo bug.

Ugh.. my bad.

I'll fix it and repost the entire series.

Thanks,
Hartley