summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/syscall-counts.py
diff options
context:
space:
mode:
authorIan Abbott <abbotti@mev.co.uk>2012-09-03 19:39:40 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-09-04 22:40:41 +0400
commit3abcfe0eeda850481143d05bdd206dd2b170d07d (patch)
tree874cfebc114f8bbb5a914822bd716c2ae5788e58 /tools/perf/scripts/python/syscall-counts.py
parent1a6671d208bb8f558dc12b6a7d2f55e80cf5828d (diff)
downloadlinux-3abcfe0eeda850481143d05bdd206dd2b170d07d.tar.xz
staging: comedi: amplc_pc236: Fix PCI ref count
When attaching a PCI device manually via the comedi driver `attach` hook (`pc236_attach()`) (called by the comedi core for the `COMEDI_DEVCONFIG` ioctl), its reference count is incremented in the `for_each_pci_dev` loop (in `pc236_find_pci_dev()`). It is decremented when the `detach` hook (`pc236_detach()`) is called to detach the device. However, when the PCI device is attached automatically via the `attach_pci` hook (`pc236_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 `pc236_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/syscall-counts.py')
0 files changed, 0 insertions, 0 deletions