diff options
author | 2012-09-03 16:39:42 +0100 | |
---|---|---|
committer | 2012-09-04 11:40:41 -0700 | |
commit | 4375e61ed21d629fe922b3e5591ad6588f715137 (patch) | |
tree | 6fd651eedc779ab5ba6dc31108e348ea70884406 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | staging: comedi: amplc_pc263: Fix PCI ref count (diff) | |
download | linux-dev-4375e61ed21d629fe922b3e5591ad6588f715137.tar.xz linux-dev-4375e61ed21d629fe922b3e5591ad6588f715137.zip |
staging: comedi: amplc_pci230: Fix PCI ref count
When attaching a PCI device manually via the comedi driver `attach` hook
(`pci230_attach()`) (called by the comedi core for the `COMEDI_DEVCONFIG`
ioctl), its reference count is incremented in the `for_each_pci_dev`
loop (in `pci230_find_pci_dev()`). It is decremented when the `detach`
hook (`pci230_detach()`) is called to detach the device. However, when
the PCI device is attached automatically via the `attach_pci` hook
(`pci230_attach_pci()`, called at probe time via
`comedi_pci_auto_config()`) it's reference count is not incremented so
there will be an unmatched decrement when detaching the device.
Increment the PCI device reference count in `pci230_attach_pci()` to
correct the mismatch.
Once support for manual configuration has been removed from this driver,
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>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions