staging: comedi: amplc_dio200: Add attach_pci() hook
authorIan Abbott <abbotti@mev.co.uk>
Thu, 31 May 2012 13:08:37 +0000 (14:08 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 5 Jun 2012 03:49:20 +0000 (20:49 -0700)
commitc894ec8da05aa8a58830297d1564675f3e1174cc
treefb6db359679f2e046866b3ecc7a0bec67606fea1
parentadb4601a82343e846997320b41d5b7d49137fe42
staging: comedi: amplc_dio200: Add attach_pci() hook

Implement the attach_pci() hook as function dio200_attach_pci().  This
is called by comedi_pci_auto_config() in preference to the old attach()
hook (implemented by dio200_attach()) and avoids searching for the
probed PCI device.

Factor out code common to dio200_find_pci() and dio200_attach_pci() into
new function dio200_find_pci_board().  Factor out most code common to
dio200_attach() and dio200_attach_pci() into new functions
dio200_pci_common_attach() and dio200_common_attach().

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