staging: comedi: dt3000: convert driver to attach_pci
authorH Hartley Sweeten <hartleys@visionengravers.com>
Fri, 26 Oct 2012 00:24:39 +0000 (17:24 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 26 Oct 2012 16:18:17 +0000 (09:18 -0700)
commitfbbeddfa91df61df53aa6fd33f4f290e6d199a87
tree0de0de75dfc0a561c590be5f87c3075990271eaa
parent0473c02a8b560e7a59af4a2d5132ef0ade0f6a33
staging: comedi: dt3000: convert driver to attach_pci

Convert this driver to use the comedi PCI auto config mechanism
by adding an attach_pci callback.

Since this driver requires no extra configuration options, and
the attach callback is now optional, remove it.

Remove the kernel noise that is output when the attach fails
for various reasons.

Use the found 'dev->board_name' for the resource name passed to
comedi_pci_enable() and request_irq().

Pass on the error returned from request_irq() instead of returning
-EINVAL on error.

Since this driver no longer walks the pci bus to find the pci_dev,
remove 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/dt3000.c