diff options
Diffstat (limited to 'drivers/pci/hotplug/pciehp.h')
-rw-r--r-- | drivers/pci/hotplug/pciehp.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/pci/hotplug/pciehp.h b/drivers/pci/hotplug/pciehp.h index b2801a7ee37f..27fd18f019f8 100644 --- a/drivers/pci/hotplug/pciehp.h +++ b/drivers/pci/hotplug/pciehp.h | |||
@@ -220,11 +220,23 @@ struct hpc_ops { | |||
220 | #include <acpi/actypes.h> | 220 | #include <acpi/actypes.h> |
221 | #include <linux/pci-acpi.h> | 221 | #include <linux/pci-acpi.h> |
222 | 222 | ||
223 | extern void __init pciehp_acpi_slot_detection_init(void); | ||
224 | extern int pciehp_acpi_slot_detection_check(struct pci_dev *dev); | ||
225 | |||
226 | static inline void pciehp_firmware_init(void) | ||
227 | { | ||
228 | pciehp_acpi_slot_detection_init(); | ||
229 | } | ||
230 | |||
223 | static inline int pciehp_get_hp_hw_control_from_firmware(struct pci_dev *dev) | 231 | static inline int pciehp_get_hp_hw_control_from_firmware(struct pci_dev *dev) |
224 | { | 232 | { |
233 | int retval; | ||
225 | u32 flags = (OSC_PCI_EXPRESS_NATIVE_HP_CONTROL | | 234 | u32 flags = (OSC_PCI_EXPRESS_NATIVE_HP_CONTROL | |
226 | OSC_PCI_EXPRESS_CAP_STRUCTURE_CONTROL); | 235 | OSC_PCI_EXPRESS_CAP_STRUCTURE_CONTROL); |
227 | return acpi_get_hp_hw_control_from_firmware(dev, flags); | 236 | retval = acpi_get_hp_hw_control_from_firmware(dev, flags); |
237 | if (retval) | ||
238 | return retval; | ||
239 | return pciehp_acpi_slot_detection_check(dev); | ||
228 | } | 240 | } |
229 | 241 | ||
230 | static inline int pciehp_get_hp_params_from_firmware(struct pci_dev *dev, | 242 | static inline int pciehp_get_hp_params_from_firmware(struct pci_dev *dev, |
@@ -235,6 +247,7 @@ static inline int pciehp_get_hp_params_from_firmware(struct pci_dev *dev, | |||
235 | return 0; | 247 | return 0; |
236 | } | 248 | } |
237 | #else | 249 | #else |
250 | #define pciehp_firmware_init() do {} while (0) | ||
238 | #define pciehp_get_hp_hw_control_from_firmware(dev) 0 | 251 | #define pciehp_get_hp_hw_control_from_firmware(dev) 0 |
239 | #define pciehp_get_hp_params_from_firmware(dev, hpp) (-ENODEV) | 252 | #define pciehp_get_hp_params_from_firmware(dev, hpp) (-ENODEV) |
240 | #endif /* CONFIG_ACPI */ | 253 | #endif /* CONFIG_ACPI */ |