]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
PCI: hotplug: Add hotplug_is_native()
authorMika Westerberg <mika.westerberg@linux.intel.com>
Mon, 28 May 2018 12:47:52 +0000 (15:47 +0300)
committerBjorn Helgaas <bhelgaas@google.com>
Mon, 4 Jun 2018 17:08:06 +0000 (12:08 -0500)
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>
include/linux/pci_hotplug.h

index 4c378368215c0395ae7f9950cdbc6f03d11a7f2d..cf5e22103f684e92563f7c63d253d15799e9322f 100644 (file)
@@ -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