]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/pci/hotplug/shpchp.h
math-emu: Fix thinko in _FP_DIV
[linux-2.6-omap-h63xx.git] / drivers / pci / hotplug / shpchp.h
index f66e8d6315abecab94d94aaffe2cf7d133a34d34..8a026f750deb65f64831f50a603c32d761e6c5ff 100644 (file)
@@ -170,6 +170,7 @@ extern void shpchp_queue_pushbutton_work(struct work_struct *work);
 extern int shpc_init( struct controller *ctrl, struct pci_dev *pdev);
 
 #ifdef CONFIG_ACPI
+#include <linux/pci-acpi.h>
 static inline int get_hp_params_from_firmware(struct pci_dev *dev,
                                              struct hotplug_params *hpp)
 {
@@ -177,14 +178,15 @@ static inline int get_hp_params_from_firmware(struct pci_dev *dev,
                        return -ENODEV;
        return 0;
 }
-#define get_hp_hw_control_from_firmware(pdev)                          \
-       do {                                                            \
-               if (DEVICE_ACPI_HANDLE(&(pdev->dev)))                   \
-                       acpi_run_oshp(DEVICE_ACPI_HANDLE(&(pdev->dev)));\
-       } while (0)
+
+static inline int get_hp_hw_control_from_firmware(struct pci_dev *dev)
+{
+       u32 flags = OSC_SHPC_NATIVE_HP_CONTROL;
+       return acpi_get_hp_hw_control_from_firmware(dev, flags);
+}
 #else
 #define get_hp_params_from_firmware(dev, hpp) (-ENODEV)
-#define get_hp_hw_control_from_firmware(dev) do { } while (0)
+#define get_hp_hw_control_from_firmware(dev) (0)
 #endif
 
 struct ctrl_reg {