summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMika Westerberg <mika.westerberg@linux.intel.com>2018-05-28 15:47:52 +0300
committerBjorn Helgaas <bhelgaas@google.com>2018-06-04 12:08:06 -0500
commit95d969ebb3925464038a32b4a225c5c52e675ae8 (patch)
treeccc625af50c33dc7d9b74e3747c5e189dba90d5a
parent90cc0c3cc7092ea4c7871fdd5fb00a9ba62842e3 (diff)
downloadop-kernel-dev-95d969ebb3925464038a32b4a225c5c52e675ae8.zip
op-kernel-dev-95d969ebb3925464038a32b4a225c5c52e675ae8.tar.gz
PCI: hotplug: Add hotplug_is_native()
Add hotplug_is_native() to find out whether the OS is supposed to handle native hotplug of a given bridge. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
-rw-r--r--include/linux/pci_hotplug.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/pci_hotplug.h b/include/linux/pci_hotplug.h
index 4c37836..cf5e221 100644
--- a/include/linux/pci_hotplug.h
+++ b/include/linux/pci_hotplug.h
@@ -181,4 +181,9 @@ static inline int acpi_get_hp_hw_control_from_firmware(struct pci_dev *bridge)
static inline bool pciehp_is_native(struct pci_dev *bridge) { return true; }
static inline bool shpchp_is_native(struct pci_dev *bridge) { return true; }
#endif
+
+static inline bool hotplug_is_native(struct pci_dev *bridge)
+{
+ return pciehp_is_native(bridge) || shpchp_is_native(bridge);
+}
#endif
OpenPOWER on IntegriCloud