aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug/pciehp.h
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2009-01-09 03:39:43 -0500
committerLen Brown <len.brown@intel.com>2009-01-09 03:39:43 -0500
commitb2576e1d4408e134e2188c967b1f28af39cd79d4 (patch)
tree004f3c82faab760f304ce031d6d2f572e7746a50 /drivers/pci/hotplug/pciehp.h
parent3cc8a5f4ba91f67bbdb81a43a99281a26aab8d77 (diff)
parent2150edc6c5cf00f7adb54538b9ea2a3e9cedca3f (diff)
Merge branch 'linus' into release
Diffstat (limited to 'drivers/pci/hotplug/pciehp.h')
-rw-r--r--drivers/pci/hotplug/pciehp.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/pci/hotplug/pciehp.h b/drivers/pci/hotplug/pciehp.h
index 7072952ea1d..db85284ffb6 100644
--- a/drivers/pci/hotplug/pciehp.h
+++ b/drivers/pci/hotplug/pciehp.h
@@ -219,11 +219,23 @@ struct hpc_ops {
219#include <acpi/acpi_bus.h> 219#include <acpi/acpi_bus.h>
220#include <linux/pci-acpi.h> 220#include <linux/pci-acpi.h>
221 221
222extern void __init pciehp_acpi_slot_detection_init(void);
223extern int pciehp_acpi_slot_detection_check(struct pci_dev *dev);
224
225static inline void pciehp_firmware_init(void)
226{
227 pciehp_acpi_slot_detection_init();
228}
229
222static inline int pciehp_get_hp_hw_control_from_firmware(struct pci_dev *dev) 230static inline int pciehp_get_hp_hw_control_from_firmware(struct pci_dev *dev)
223{ 231{
232 int retval;
224 u32 flags = (OSC_PCI_EXPRESS_NATIVE_HP_CONTROL | 233 u32 flags = (OSC_PCI_EXPRESS_NATIVE_HP_CONTROL |
225 OSC_PCI_EXPRESS_CAP_STRUCTURE_CONTROL); 234 OSC_PCI_EXPRESS_CAP_STRUCTURE_CONTROL);
226 return acpi_get_hp_hw_control_from_firmware(dev, flags); 235 retval = acpi_get_hp_hw_control_from_firmware(dev, flags);
236 if (retval)
237 return retval;
238 return pciehp_acpi_slot_detection_check(dev);
227} 239}
228 240
229static inline int pciehp_get_hp_params_from_firmware(struct pci_dev *dev, 241static inline int pciehp_get_hp_params_from_firmware(struct pci_dev *dev,
@@ -234,6 +246,7 @@ static inline int pciehp_get_hp_params_from_firmware(struct pci_dev *dev,
234 return 0; 246 return 0;
235} 247}
236#else 248#else
249#define pciehp_firmware_init() do {} while (0)
237#define pciehp_get_hp_hw_control_from_firmware(dev) 0 250#define pciehp_get_hp_hw_control_from_firmware(dev) 0
238#define pciehp_get_hp_params_from_firmware(dev, hpp) (-ENODEV) 251#define pciehp_get_hp_params_from_firmware(dev, hpp) (-ENODEV)
239#endif /* CONFIG_ACPI */ 252#endif /* CONFIG_ACPI */