2012-06-15 22:20:36

by Hartley Sweeten

[permalink] [raw]
Subject: [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.

Signed-off-by: H Hartley Sweeten <[email protected]>
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(-)

diff --git a/drivers/staging/comedi/Kconfig b/drivers/staging/comedi/Kconfig
index 2ca7f08..88ef0c7 100644
--- a/drivers/staging/comedi/Kconfig
+++ b/drivers/staging/comedi/Kconfig
@@ -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
--
1.7.7


2012-06-18 23:59:08

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH 1/4] staging: comedi: Kconfig: menuconfig options should be bool not tristate

On Fri, Jun 15, 2012 at 03:20:04PM -0700, H Hartley Sweeten wrote:
> 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.
>
> Signed-off-by: H Hartley Sweeten <[email protected]>
> 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

2012-06-19 00:01:50

by Hartley Sweeten

[permalink] [raw]
Subject: RE: [PATCH 1/4] staging: comedi: Kconfig: menuconfig options should be bool not tristate

On Monday, June 18, 2012 4:59 PM, Greg KH wrote:
> On Fri, Jun 15, 2012 at 03:20:04PM -0700, H Hartley Sweeten wrote:
>> 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.
>>
>> Signed-off-by: H Hartley Sweeten <[email protected]>
>> 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?

Hmm.. Builds fine for me.

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

Thanks,
Hartley

2012-06-19 00:16:24

by Hartley Sweeten

[permalink] [raw]
Subject: RE: [PATCH 1/4] staging: comedi: Kconfig: menuconfig options should be bool not tristate

On Monday, June 18, 2012 4:59 PM, Greg KH wrote:
> On Fri, Jun 15, 2012 at 03:20:04PM -0700, H Hartley Sweeten wrote:
>> 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.
>>
>> Signed-off-by: H Hartley Sweeten <[email protected]>
>> 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!

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


2012-06-19 00:31:01

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH 1/4] staging: comedi: Kconfig: menuconfig options should be bool not tristate

On Mon, Jun 18, 2012 at 07:16:10PM -0500, H Hartley Sweeten wrote:
> On Monday, June 18, 2012 4:59 PM, Greg KH wrote:
> > On Fri, Jun 15, 2012 at 03:20:04PM -0700, H Hartley Sweeten wrote:
> >> 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.
> >>
> >> Signed-off-by: H Hartley Sweeten <[email protected]>
> >> 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!
>
> 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.

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.



Attachments:
(No filename) (1.58 kB)
.config (103.84 kB)
Download all attachments

2012-06-19 01:01:21

by Hartley Sweeten

[permalink] [raw]
Subject: RE: [PATCH 1/4] staging: comedi: Kconfig: menuconfig options should be bool not tristate

On Monday, June 18, 2012 5:31 PM, Greg KH wrote:
> 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


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

Signed-off-by: H Hartley Sweeten <[email protected]>
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(-)

diff --git a/drivers/staging/comedi/Kconfig b/drivers/staging/comedi/Kconfig
index 2ca7f08..198a55d 100644
--- a/drivers/staging/comedi/Kconfig
+++ b/drivers/staging/comedi/Kconfig
@@ -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

diff --git a/drivers/staging/comedi/drivers/Makefile b/drivers/staging/comedi/drivers/Makefile
index 170da60..513469d 100644
--- a/drivers/staging/comedi/drivers/Makefile
+++ b/drivers/staging/comedi/drivers/Makefile
@@ -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
--
1.7.11

2012-06-19 08:35:37

by Ian Abbott

[permalink] [raw]
Subject: Re: [PATCH 1/4] staging: comedi: Kconfig: menuconfig options should be bool not tristate

On 2012-06-19 02:01, H Hartley Sweeten wrote:
> On Monday, June 18, 2012 5:31 PM, Greg KH wrote:
>> 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"
> + select COMED_8255
> ---help---
> Enable support for ADlink PCI-7296 96 ch. digital io board support

That one has a typo bug.

--
-=( Ian Abbott @ MEV Ltd. E-mail: <[email protected]> )=-
-=( Tel: +44 (0)161 477 1898 FAX: +44 (0)161 718 3587 )=-

2012-06-19 16:32:21

by Hartley Sweeten

[permalink] [raw]
Subject: RE: [PATCH 1/4] staging: comedi: Kconfig: menuconfig options should be bool not tristate

On Tuesday, June 19, 2012 1:35 AM, Ian Abbott wrote:
> On 2012-06-19 02:01, H Hartley Sweeten wrote:
>> On Monday, June 18, 2012 5:31 PM, Greg KH wrote:
>>> 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"
>> + 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