From: Mika Westerberg Date: Mon, 28 May 2018 12:47:52 +0000 (+0300) Subject: PCI: hotplug: Add hotplug_is_native() X-Git-Tag: android-x86-8.1-r1~931^2~19^2~7 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=95d969ebb3925464038a32b4a225c5c52e675ae8;p=android-x86%2Fkernel.git 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 Signed-off-by: Bjorn Helgaas Reviewed-by: Rafael J. Wysocki Reviewed-by: Andy Shevchenko --- diff --git a/include/linux/pci_hotplug.h b/include/linux/pci_hotplug.h index 4c378368215c..cf5e22103f68 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