]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/pci/hotplug/shpchp.h
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux...
[linux-2.6-omap-h63xx.git] / drivers / pci / hotplug / shpchp.h
index f66e8d6315abecab94d94aaffe2cf7d133a34d34..4d9fed00e1d0ecd671af290015566e8d82e23b9e 100644 (file)
@@ -69,15 +69,13 @@ struct slot {
        u8 state;
        u8 presence_save;
        u8 pwr_save;
-       struct timer_list task_event;
-       u8 hp_slot;
        struct controller *ctrl;
        struct hpc_ops *hpc_ops;
        struct hotplug_slot *hotplug_slot;
        struct list_head        slot_list;
-       char name[SLOT_NAME_SIZE];
        struct delayed_work work;       /* work for button event */
        struct mutex lock;
+       u8 hp_slot;
 };
 
 struct event_info {
@@ -169,7 +167,13 @@ extern void cleanup_slots(struct controller *ctrl);
 extern void shpchp_queue_pushbutton_work(struct work_struct *work);
 extern int shpc_init( struct controller *ctrl, struct pci_dev *pdev);
 
+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_params_from_firmware(struct pci_dev *dev,
                                              struct hotplug_params *hpp)
 {
@@ -177,14 +181,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 {