提交 96a621e0 编写于 作者: M Mika Westerberg 提交者: Bjorn Helgaas

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: NMika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
Reviewed-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 6f77fa49
...@@ -173,16 +173,6 @@ static inline const char *slot_name(struct slot *slot) ...@@ -173,16 +173,6 @@ static inline const char *slot_name(struct slot *slot)
return hotplug_slot_name(slot->hotplug_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 { struct ctrl_reg {
volatile u32 base_offset; volatile u32 base_offset;
volatile u32 slot_avail1; volatile u32 slot_avail1;
......
...@@ -277,7 +277,7 @@ static int is_shpc_capable(struct pci_dev *dev) ...@@ -277,7 +277,7 @@ static int is_shpc_capable(struct pci_dev *dev)
return 1; return 1;
if (!pci_find_capability(dev, PCI_CAP_ID_SHPC)) if (!pci_find_capability(dev, PCI_CAP_ID_SHPC))
return 0; return 0;
if (get_hp_hw_control_from_firmware(dev)) if (acpi_get_hp_hw_control_from_firmware(dev))
return 0; return 0;
return 1; return 1;
} }
......
...@@ -172,6 +172,11 @@ static inline int pci_get_hp_params(struct pci_dev *dev, ...@@ -172,6 +172,11 @@ static inline int pci_get_hp_params(struct pci_dev *dev,
{ {
return -ENODEV; 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; } static inline bool pciehp_is_native(struct pci_dev *bridge) { return true; }
#endif #endif
#endif #endif
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册