[PATCH 1/5] staging: comedi: ni_labpc: split out PCI support

H Hartley Sweeten hartleys at visionengravers.com
Tue Apr 23 18:09:23 UTC 2013

On Tuesday, April 23, 2013 5:24 AM, Ian Abbott wrote:
> On 2013-04-22 20:33, H Hartley Sweeten wrote:
>> Currently the ni_labpc driver is used by the legacy (ISA), PCI, and
>> PCMCIA versions of the LabPC board. The driver is enabled under the
>> COMEDI_PCI_DRIVERS section of the Kconfig. This means that PCI support
>> must be enabled in order to use the ni_labpc driver for the PCI or
>> PCMCIA drivers.
>> Split the PCI support code out of the ni_labpc driver into a separate
>> driver, ni_labpc_pci. The PCMCIA support is already slip out as
>> ni_labpc_cs.
>> Modify the Kconfig so that the common code in ni_labpc is enabled by the
>> Kconfig option COMEDI_NI_LABPC. The ISA support code is currently still
>> in the ni_labpc driver but is only compiled in if COMEDI_NI_LABPC_ISA is
>> also enabled.
>> This allows the PCI and PCMCIA drivers to be enabled without the need
>> for the ISA stuff.
>> Signed-off-by: H Hartley Sweeten <hsweeten at visionengravers.com>
>> Cc: Ian Abbott <abbotti at mev.co.uk>
>> Cc: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
> Just minor niggles, can be fixed up later.


>>   static int labpc_attach(struct comedi_device *dev, struct comedi_devconfig *it)
>>   {
>>          const struct labpc_boardinfo *board = comedi_board(dev);
> 'board' is now an unused variable here and can be removed.
>  [snip]
>> -void labpc_common_detach(struct comedi_device *dev)
>> +void labpc_detach(struct comedi_device *dev)
> 'labpc_detach' should be declared 'static'.

I was wondering why I didn't see these issues.

CONFIG_COMEDI_NI_LABPC_ISA is a tristate so #if IS_ENABLED() needs
to be used not #ifdef.

Greg just merged this series so I posted a new patch to fix this.

Gah... Sorry about that.

More information about the devel mailing list