Skip to content

Commit 02e0bea

Browse files
Phil Sutterdavem330
authored andcommitted
PCI: implement num_vf bus type callback
Signed-off-by: Phil Sutter <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 582a686 commit 02e0bea

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/pci/pci-driver.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1432,6 +1432,11 @@ static int pci_uevent(struct device *dev, struct kobj_uevent_env *env)
14321432
return 0;
14331433
}
14341434

1435+
static int pci_bus_num_vf(struct device *dev)
1436+
{
1437+
return pci_num_vf(to_pci_dev(dev));
1438+
}
1439+
14351440
struct bus_type pci_bus_type = {
14361441
.name = "pci",
14371442
.match = pci_bus_match,
@@ -1443,6 +1448,7 @@ struct bus_type pci_bus_type = {
14431448
.bus_groups = pci_bus_groups,
14441449
.drv_groups = pci_drv_groups,
14451450
.pm = PCI_PM_OPS_PTR,
1451+
.num_vf = pci_bus_num_vf,
14461452
};
14471453
EXPORT_SYMBOL(pci_bus_type);
14481454

0 commit comments

Comments
 (0)