]> git.karo-electronics.de Git - linux-beck.git/commit
staging: comedi: adl_pci9118: split pci9118_attach()
authorIan Abbott <abbotti@mev.co.uk>
Fri, 2 Nov 2012 13:52:30 +0000 (13:52 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 Nov 2012 18:39:37 +0000 (11:39 -0700)
commitf3b81d54585b2b050257228555f15c0e507024d1
tree3e1ff6949318a219e3ea1af4c3242ee50bb64304
parentf41d2573b22c5eafff868824004095fff92b0e8c
staging: comedi: adl_pci9118: split pci9118_attach()

Split most of the functionality of the attach routine `pci9118_attach()`
into a new function `pci9118_common_attach()` that can be called when
auto-attachment of devices is supported.  Move the enabling of the PCI
device and its i/o regions into this function.  Do the requesting of the
interrupt near the end of the function so it doesn't get enabled before
the device is ready.

Note that auto-attachment of PCI devices is currently broken in this
driver because the list of board names referred to by the `struct
comedi_driver` does not contain a "wildcard" entry matching the comedi
driver name.  This won't be a problem once support for the
`auto_attach()` method is added.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/adl_pci9118.c