diff options
author | Ian Abbott <[email protected]> | 2012-09-03 16:39:41 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2012-09-04 11:40:41 -0700 |
commit | a0234ade63ce2c14841d9d6e802ed735b4ed2829 (patch) | |
tree | 5d8c97f0aeb5a64aa6930ecf4224ae6291a7015f /tools/perf/util/trace-event-scripting.c | |
parent | 3abcfe0eeda850481143d05bdd206dd2b170d07d (diff) |
staging: comedi: amplc_pc263: Fix PCI ref count
When attaching a PCI device manually via the comedi driver `attach` hook
(`pc263_attach()`) (called by the comedi core for the `COMEDI_DEVCONFIG`
ioctl), its reference count is incremented in the `for_each_pci_dev`
loop (in `pc263_find_pci_dev()`). It is decremented when the `detach`
hook (`pc263_detach()`) is called to detach the device. However, when
the PCI device is attached automatically via the `attach_pci` hook
(`pc263_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 `pc263_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 <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions