mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
pci: Add pci_dev_bus_num() helper
A fair proportion of the users of pci_bus_num() want to get the bus number on a specific device, so first have to look up the bus from the device then call it. This adds a helper to do that (since we're going to make looking up the bus slightly more verbose). Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Marcel Apfelbaum <marcel@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com>
This commit is contained in:
parent
791bf3c8f0
commit
cdc57472dc
7 changed files with 16 additions and 11 deletions
|
@ -1025,7 +1025,7 @@ static int do_pcie_aer_inject_error(Monitor *mon,
|
|||
}
|
||||
details->id = id;
|
||||
details->root_bus = pci_root_bus_path(dev);
|
||||
details->bus = pci_bus_num(dev->bus);
|
||||
details->bus = pci_dev_bus_num(dev);
|
||||
details->devfn = dev->devfn;
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue