aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/comedi/drivers/amplc_pc236.c
diff options
context:
space:
mode:
authorIan Abbott <abbotti@mev.co.uk>2014-07-25 10:04:50 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-07-27 11:28:38 -0700
commitf78660123ff8e35e8098eefb8f8087a916239108 (patch)
tree4f3c2bcad77494a544f271c4239edb4bb89204a9 /drivers/staging/comedi/drivers/amplc_pc236.c
parentstaging: comedi: amplc_pc236: remove manual configuration of PCI boards (diff)
downloadlinux-dev-f78660123ff8e35e8098eefb8f8087a916239108.tar.xz
linux-dev-f78660123ff8e35e8098eefb8f8087a916239108.zip
staging: comedi: amplc_pc236: no need to manipulate PCI ref count
Now that this driver no longer supports "manual" attachment of PCI devices in its `attach` hook (`pc236_attach()`), it no longer has code that searches for a suitable PCI device and increments its reference count. Since the driver no longer has any reason for incrementing and decrementing the PCI device's reference count, the calls to `pci_dev_get()` and `pci_dev_put()` 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>
Diffstat (limited to 'drivers/staging/comedi/drivers/amplc_pc236.c')
-rw-r--r--drivers/staging/comedi/drivers/amplc_pc236.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/drivers/staging/comedi/drivers/amplc_pc236.c b/drivers/staging/comedi/drivers/amplc_pc236.c
index 7331ae3cac9c..cf45c58a1c46 100644
--- a/drivers/staging/comedi/drivers/amplc_pc236.c
+++ b/drivers/staging/comedi/drivers/amplc_pc236.c
@@ -417,13 +417,6 @@ static int pc236_auto_attach(struct comedi_device *dev,
dev_err(dev->class_dev, "BUG! cannot determine board type!\n");
return -EINVAL;
}
- /*
- * Need to 'get' the PCI device to match the 'put' in pc236_detach().
- * TODO: Remove the pci_dev_get() and matching pci_dev_put() once
- * support for manual attachment of PCI devices via pc236_attach()
- * has been removed.
- */
- pci_dev_get(pci_dev);
return pc236_pci_common_attach(dev, pci_dev);
}
@@ -438,13 +431,9 @@ static void pc236_detach(struct comedi_device *dev)
if (is_isa_board(thisboard)) {
comedi_legacy_detach(dev);
} else if (is_pci_board(thisboard)) {
- struct pci_dev *pcidev = comedi_to_pci_dev(dev);
-
if (dev->irq)
free_irq(dev->irq, dev);
comedi_pci_disable(dev);
- if (pcidev)
- pci_dev_put(pcidev);
}
}