staging: comedi: contec_pci_dio: use attach_pci callback
authorH Hartley Sweeten <hartleys@visionengravers.com>
Thu, 16 Aug 2012 00:32:29 +0000 (17:32 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 16 Aug 2012 18:30:41 +0000 (11:30 -0700)
commit8d02b3aa670547f307b50058b2ca1c1fab2518ed
tree80c465578ea6769782549f0ff7fedf11e496fe86
parent3256837311344ef7efa41c717a280f95207e5140
staging: comedi: contec_pci_dio: use attach_pci callback

Convert this PCI driver to use the comedi PCI auto config attach
mechanism by adding an attach_pci callback function. Since the
driver does not require any external configuration options, disable
the legacy attach by making the attach simply return -ENOSYS. This
removes the need to walk to pci bus to find the pci_dev and the
need for the pci_dev_put in the detach.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/contec_pci_dio.c