Blob Blame History Raw
From 95d969ebb3925464038a32b4a225c5c52e675ae8 Mon Sep 17 00:00:00 2001
From: Mika Westerberg <mika.westerberg@linux.intel.com>
Date: Mon, 28 May 2018 15:47:52 +0300
Subject: [PATCH] PCI: hotplug: Add hotplug_is_native()
Git-commit: 95d969ebb3925464038a32b4a225c5c52e675ae8
Patch-mainline: v4.18
References: FATE#326302 FATE#326303

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>
Signed-off-by: Oliver Neukum <oneukum@suse.com>
---
 include/linux/pci_hotplug.h |    5 +++++
 1 file changed, 5 insertions(+)

--- a/include/linux/pci_hotplug.h
+++ b/include/linux/pci_hotplug.h
@@ -194,4 +194,9 @@ static inline int acpi_get_hp_hw_control
 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