Commit 228df3c9 authored by Ian Abbott's avatar Ian Abbott Committed by Greg Kroah-Hartman

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: default avatarIan Abbott <>
Reviewed-by: default avatarH Hartley Sweeten <>
Signed-off-by: default avatarGreg Kroah-Hartman <>
parent ca5119c9
......@@ -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.
return pci230_attach_common(dev, pci_dev);
static void pci230_detach(struct comedi_device *dev)
struct pci_dev *pcidev = comedi_to_pci_dev(dev);
if (pcidev)
static struct comedi_driver amplc_pci230_driver = {
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment