[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <152996759356.260522.17897676139260762555.stgit@bhelgaas-glaptop.roam.corp.google.com>
Date: Mon, 25 Jun 2018 17:59:53 -0500
From: Bjorn Helgaas <helgaas@...nel.org>
To: linux-pci@...r.kernel.org
Cc: Marc Zyngier <marc.zyngier@....com>,
Mika Westerberg <mika.westerberg@...ux.intel.com>,
linux-kernel@...r.kernel.org
Subject: [PATCH v1 3/4] PCI: shpchp: Inline shpchp_is_native()
From: Bjorn Helgaas <bhelgaas@...gle.com>
shpchp_is_native() is trivial and has nothing to do with ACPI, so make it
an inline in pci_hotplug.h.
Signed-off-by: Bjorn Helgaas <bhelgaas@...gle.com>
---
drivers/pci/pci-acpi.c | 12 ------------
include/linux/pci_hotplug.h | 8 ++++++--
2 files changed, 6 insertions(+), 14 deletions(-)
diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c
index 5100fd2d5a75..52b8434d4d6e 100644
--- a/drivers/pci/pci-acpi.c
+++ b/drivers/pci/pci-acpi.c
@@ -394,18 +394,6 @@ bool pciehp_is_native(struct pci_dev *bridge)
return host->native_pcie_hotplug;
}
-/**
- * shpchp_is_native - Check whether a hotplug port is handled by the OS
- * @bridge: Hotplug port to check
- *
- * Returns true if the given @bridge is handled by the native SHPC hotplug
- * driver.
- */
-bool shpchp_is_native(struct pci_dev *bridge)
-{
- return bridge->shpc_managed;
-}
-
/**
* pci_acpi_wake_bus - Root bus wakeup notification fork function.
* @context: Device wakeup context.
diff --git a/include/linux/pci_hotplug.h b/include/linux/pci_hotplug.h
index cf5e22103f68..f08a44e1606f 100644
--- a/include/linux/pci_hotplug.h
+++ b/include/linux/pci_hotplug.h
@@ -162,11 +162,15 @@ struct hotplug_params {
#ifdef CONFIG_ACPI
#include <linux/acpi.h>
int pci_get_hp_params(struct pci_dev *dev, struct hotplug_params *hpp);
-bool pciehp_is_native(struct pci_dev *bridge);
int acpi_get_hp_hw_control_from_firmware(struct pci_dev *bridge);
-bool shpchp_is_native(struct pci_dev *bridge);
int acpi_pci_check_ejectable(struct pci_bus *pbus, acpi_handle handle);
int acpi_pci_detect_ejectable(acpi_handle handle);
+
+bool pciehp_is_native(struct pci_dev *bridge);
+static inline bool shpchp_is_native(struct pci_dev *bridge)
+{
+ return bridge->shpc_managed;
+}
#else
static inline int pci_get_hp_params(struct pci_dev *dev,
struct hotplug_params *hpp)
Powered by blists - more mailing lists