Merge git://git.infradead.org/iommu-2.6
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / drivers / base / power / power.h
blobc7cb4fc3735c5594cdb26530c81d92fbcacaf438
1 static inline void device_pm_init(struct device *dev)
3 dev->power.status = DPM_ON;
6 #ifdef CONFIG_PM_SLEEP
8 /*
9 * main.c
12 extern struct list_head dpm_list; /* The active device list */
14 static inline struct device *to_device(struct list_head *entry)
16 return container_of(entry, struct device, power.entry);
19 extern void device_pm_add(struct device *);
20 extern void device_pm_remove(struct device *);
21 extern void device_pm_move_before(struct device *, struct device *);
22 extern void device_pm_move_after(struct device *, struct device *);
23 extern void device_pm_move_last(struct device *);
25 #else /* CONFIG_PM_SLEEP */
27 static inline void device_pm_add(struct device *dev) {}
28 static inline void device_pm_remove(struct device *dev) {}
29 static inline void device_pm_move_before(struct device *deva,
30 struct device *devb) {}
31 static inline void device_pm_move_after(struct device *deva,
32 struct device *devb) {}
33 static inline void device_pm_move_last(struct device *dev) {}
35 #endif
37 #ifdef CONFIG_PM
40 * sysfs.c
43 extern int dpm_sysfs_add(struct device *);
44 extern void dpm_sysfs_remove(struct device *);
46 #else /* CONFIG_PM */
48 static inline int dpm_sysfs_add(struct device *dev)
50 return 0;
53 static inline void dpm_sysfs_remove(struct device *dev)
57 #endif