summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMika Westerberg <mika.westerberg@linux.intel.com>2018-05-24 15:10:21 -0500
committerBjorn Helgaas <bhelgaas@google.com>2018-06-02 00:18:28 -0500
commit96a621e01a42dc53848e2e4915fd807ebc1fc82f (patch)
tree159ed53677ea087828c78c80e046babbb02b5d26
parent6f77fa4941aac0fa721eef5fe61820a4c314fffb (diff)
downloadop-kernel-dev-96a621e01a42dc53848e2e4915fd807ebc1fc82f.zip
op-kernel-dev-96a621e01a42dc53848e2e4915fd807ebc1fc82f.tar.gz
PCI: shpchp: Remove get_hp_hw_control_from_firmware() wrapper
get_hp_hw_control_from_firmware() is a trivial wrapper around acpi_get_hp_hw_control_from_firmware(), probably intended to be generic in case other firmware needed similar OS/platform negotiation. Remove get_hp_hw_control_from_firmware() and call acpi_get_hp_hw_control_from_firmware() directly. Add a stub for acpi_get_hp_hw_control_from_firmware() for the non-ACPI case. 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>
-rw-r--r--drivers/pci/hotplug/shpchp.h10
-rw-r--r--drivers/pci/hotplug/shpchp_core.c2
-rw-r--r--include/linux/pci_hotplug.h5
3 files changed, 6 insertions, 11 deletions
diff --git a/drivers/pci/hotplug/shpchp.h b/drivers/pci/hotplug/shpchp.h
index 71f44ed..9675ab7 100644
--- a/drivers/pci/hotplug/shpchp.h
+++ b/drivers/pci/hotplug/shpchp.h
@@ -173,16 +173,6 @@ static inline const char *slot_name(struct slot *slot)
return hotplug_slot_name(slot->hotplug_slot);
}
-#ifdef CONFIG_ACPI
-#include <linux/pci-acpi.h>
-static inline int get_hp_hw_control_from_firmware(struct pci_dev *dev)
-{
- return acpi_get_hp_hw_control_from_firmware(dev);
-}
-#else
-#define get_hp_hw_control_from_firmware(dev) (0)
-#endif
-
struct ctrl_reg {
volatile u32 base_offset;
volatile u32 slot_avail1;
diff --git a/drivers/pci/hotplug/shpchp_core.c b/drivers/pci/hotplug/shpchp_core.c
index 1f0f969..47decc9 100644
--- a/drivers/pci/hotplug/shpchp_core.c
+++ b/drivers/pci/hotplug/shpchp_core.c
@@ -277,7 +277,7 @@ static int is_shpc_capable(struct pci_dev *dev)
return 1;
if (!pci_find_capability(dev, PCI_CAP_ID_SHPC))
return 0;
- if (get_hp_hw_control_from_firmware(dev))
+ if (acpi_get_hp_hw_control_from_firmware(dev))
return 0;
return 1;
}
diff --git a/include/linux/pci_hotplug.h b/include/linux/pci_hotplug.h
index 3959121..1f5c935 100644
--- a/include/linux/pci_hotplug.h
+++ b/include/linux/pci_hotplug.h
@@ -172,6 +172,11 @@ static inline int pci_get_hp_params(struct pci_dev *dev,
{
return -ENODEV;
}
+
+static inline int acpi_get_hp_hw_control_from_firmware(struct pci_dev *bridge)
+{
+ return 0;
+}
static inline bool pciehp_is_native(struct pci_dev *bridge) { return true; }
#endif
#endif
OpenPOWER on IntegriCloud