diff options
author | Ian Abbott <abbotti@mev.co.uk> | 2014-09-01 12:03:38 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-09-02 11:21:31 -0700 |
commit | 228df3c99b511ec563dbbd3c7385a3ed83201dd5 (patch) | |
tree | 81fd30c42bf4f3463796b702ff727aa85d2bc9f1 | |
parent | ca5119c93f0dee89b5543fbdbc0c96a046ed20e6 (diff) | |
download | linux-228df3c99b511ec563dbbd3c7385a3ed83201dd5.tar.bz2 |
staging: comedi: amplc_pci230: no need to manipulate PCI ref count
This driver no longer supports a "legacy" attach mechanism that searches
for a suitable PCI device and increments it's reference count, but since
the common "detach" handler `pci230_detach()` still has a left-over
`pci_dev_put()`, a matching `pci_dev_get()` is needed in the
"auto_attach" handler `pci230_auto_attach()`. There is no longer any
reason to "get" and "put" the PCI device, so those calls can be removed.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/comedi/drivers/amplc_pci230.c | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/drivers/staging/comedi/drivers/amplc_pci230.c b/drivers/staging/comedi/drivers/amplc_pci230.c index 393712c1b13e..39fa2f63f14a 100644 --- a/drivers/staging/comedi/drivers/amplc_pci230.c +++ b/drivers/staging/comedi/drivers/amplc_pci230.c @@ -2729,23 +2729,12 @@ static int pci230_auto_attach(struct comedi_device *dev, "amplc_pci230: BUG! cannot determine board type!\n"); return -EINVAL; } - /* - * Need to 'get' the PCI device to match the 'put' in pci230_detach(). - * TODO: Remove the pci_dev_get() and matching pci_dev_put() once - * support for manual attachment of PCI devices via pci230_attach() - * has been removed. - */ - pci_dev_get(pci_dev); return pci230_attach_common(dev, pci_dev); } static void pci230_detach(struct comedi_device *dev) { - struct pci_dev *pcidev = comedi_to_pci_dev(dev); - comedi_pci_detach(dev); - if (pcidev) - pci_dev_put(pcidev); } static struct comedi_driver amplc_pci230_driver = { |