]> git.karo-electronics.de Git - karo-tx-linux.git/commit
staging: comedi: jr3_pci: use auto_attach method
authorIan Abbott <abbotti@mev.co.uk>
Thu, 1 Nov 2012 18:34:35 +0000 (18:34 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Nov 2012 19:35:56 +0000 (12:35 -0700)
commitb7703d7d4866424a99fc80efa070842f51b9fe66
tree1f57f0dd28a0026ece42c70a3c593dc108d1c0b6
parent9f4f2c6806851ec67a9d6426c8797c591c5d789d
staging: comedi: jr3_pci: use auto_attach method

This driver does not need to support manual attachment of supported PCI
devices.  Replace the `attach()` hook (`jr3_pci_attach()`) with an
`auto_attach()` hook (`jr3_pci_auto_attach()`).  This will be called via
`comedi_pci_auto_config()` at PCI probe time.

This driver no longer increments the PCI reference count during
attachment, so remove the call to `pci_dev_put()` when detaching the
device.

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