]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
PCI: shpchp: Remove get_hp_hw_control_from_firmware() wrapper
authorMika Westerberg <mika.westerberg@linux.intel.com>
Thu, 24 May 2018 20:10:21 +0000 (15:10 -0500)
committerBjorn Helgaas <bhelgaas@google.com>
Sat, 2 Jun 2018 05:18:28 +0000 (00:18 -0500)
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>
drivers/pci/hotplug/shpchp.h
drivers/pci/hotplug/shpchp_core.c
include/linux/pci_hotplug.h

index 71f44edaa94d4519ced4420b6eb4a58bd748b46d..9675ab757323a64a00a615907cf418e6339efe9a 100644 (file)
@@ -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;
index 1f0f96908b5adb724ce681a79fb5e950a1c319ba..47decc9b3bb31a57afe91180007a4021d3e18b7f 100644 (file)
@@ -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;
 }
index 39591213a5840c0499ea6510e69a877ea2822eb7..1f5c935eb0de3c44c0496d8f83d4855f6aa28ee0 100644 (file)
@@ -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