Skip to content

Commit

Permalink
PCI: implement num_vf bus type callback
Browse files Browse the repository at this point in the history
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Phil Sutter authored and David S. Miller committed Jan 20, 2017
1 parent 582a686 commit 02e0bea
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/pci/pci-driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -1432,6 +1432,11 @@ static int pci_uevent(struct device *dev, struct kobj_uevent_env *env)
return 0;
}

static int pci_bus_num_vf(struct device *dev)
{
return pci_num_vf(to_pci_dev(dev));
}

struct bus_type pci_bus_type = {
.name = "pci",
.match = pci_bus_match,
Expand All @@ -1443,6 +1448,7 @@ struct bus_type pci_bus_type = {
.bus_groups = pci_bus_groups,
.drv_groups = pci_drv_groups,
.pm = PCI_PM_OPS_PTR,
.num_vf = pci_bus_num_vf,
};
EXPORT_SYMBOL(pci_bus_type);

Expand Down

0 comments on commit 02e0bea

Please sign in to comment.