diff options
author | Phil Sutter <phil@nwl.cc> | 2017-01-18 08:04:39 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-01-20 11:43:17 -0500 |
commit | 9af15c38254d81c9991eba89335ca7c537d7f2c3 (patch) | |
tree | ca35f65647606c5c99c2a1b75a7f8ca184e06a9c /include/linux/pci.h | |
parent | 02e0bea6c83c657617195135667e6a3f50d3bfb3 (diff) |
device: Implement a bus agnostic dev_num_vf routine
Now that pci_bus_type has num_vf callback set, dev_num_vf can be
implemented in a bus type independent way and the check for whether a
PCI device is being handled in rtnetlink can be dropped.
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/pci.h')
-rw-r--r-- | include/linux/pci.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h index e2d1a124216a..adbc859fe7c4 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -885,7 +885,6 @@ void pcibios_setup_bridge(struct pci_bus *bus, unsigned long type); | |||
885 | void pci_sort_breadthfirst(void); | 885 | void pci_sort_breadthfirst(void); |
886 | #define dev_is_pci(d) ((d)->bus == &pci_bus_type) | 886 | #define dev_is_pci(d) ((d)->bus == &pci_bus_type) |
887 | #define dev_is_pf(d) ((dev_is_pci(d) ? to_pci_dev(d)->is_physfn : false)) | 887 | #define dev_is_pf(d) ((dev_is_pci(d) ? to_pci_dev(d)->is_physfn : false)) |
888 | #define dev_num_vf(d) ((dev_is_pci(d) ? pci_num_vf(to_pci_dev(d)) : 0)) | ||
889 | 888 | ||
890 | /* Generic PCI functions exported to card drivers */ | 889 | /* Generic PCI functions exported to card drivers */ |
891 | 890 | ||
@@ -1630,7 +1629,6 @@ static inline int pci_get_new_domain_nr(void) { return -ENOSYS; } | |||
1630 | 1629 | ||
1631 | #define dev_is_pci(d) (false) | 1630 | #define dev_is_pci(d) (false) |
1632 | #define dev_is_pf(d) (false) | 1631 | #define dev_is_pf(d) (false) |
1633 | #define dev_num_vf(d) (0) | ||
1634 | #endif /* CONFIG_PCI */ | 1632 | #endif /* CONFIG_PCI */ |
1635 | 1633 | ||
1636 | /* Include architecture-dependent settings and functions */ | 1634 | /* Include architecture-dependent settings and functions */ |