diff options
| author | H Hartley Sweeten <[email protected]> | 2012-07-18 18:56:29 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2012-07-19 16:32:57 -0700 |
| commit | f34ec8002b685e865e26c384887b90149949c5bf (patch) | |
| tree | c8da87f3b4c0115141b24778ca8e06b573549c47 /tools/perf/scripts/python/net_dropmonitor.py | |
| parent | 6896ddfa109b32bef1892a3cbeb5c90d78d568c5 (diff) | |
staging: comedi: daqboard2000: cleanup "find pci device" code
The "find pci device" code for this driver was quite a bit
different from the other comedi pci drivers. Clean it up so
it follows the format of the other drivers.
Use for_each_pci_dev() instead of open-coding the loop using
pci_get_device().
Check for a specific bus/slot then the vendor/device ids.
The loop checking for the matching boardinfo was creating an
"id" based on the subsystem_device and subsystem_vendor info
from the pci_dev. The vendor id was already checked so just
check against the subsystem_device.
Only return the pci_dev if a matching boardinfo is found.
Consolidate the dev_err messages when a device is not found
into a single message.
Signed-off-by: H Hartley Sweeten <[email protected]>
Cc: Ian Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/net_dropmonitor.py')
0 files changed, 0 insertions, 0 deletions