Now that this driver no longer supports "manual" attachment of PCI
devices in its `attach` hook (`dio200_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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
dev_err(dev->class_dev, "BUG! cannot determine board type!\n");
return -EINVAL;
}
- /*
- * Need to 'get' the PCI device to match the 'put' in dio200_detach().
- * TODO: Remove the pci_dev_get() and matching pci_dev_put() once
- * support for manual attachment of PCI devices via dio200_attach()
- * has been removed.
- */
- pci_dev_get(pci_dev);
return dio200_pci_common_attach(dev, pci_dev);
}
if (pcidev) {
if (dev->iobase)
comedi_pci_disable(pcidev);
- pci_dev_put(pcidev);
}
}
}