Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
[linux-2.6/linux-mips/linux-dm7025.git] / drivers / base / power / power.h
bloba6894f2a4b9960d1a19094fa8b4b7890b9bd0e6d
1 #ifdef CONFIG_PM_SLEEP
3 /*
4 * main.c
5 */
7 extern struct list_head dpm_active; /* The active device list */
9 static inline struct device *to_device(struct list_head *entry)
11 return container_of(entry, struct device, power.entry);
14 extern int device_pm_add(struct device *);
15 extern void device_pm_remove(struct device *);
17 #else /* CONFIG_PM_SLEEP */
19 static inline int device_pm_add(struct device *dev) { return 0; }
20 static inline void device_pm_remove(struct device *dev) {}
22 #endif
24 #ifdef CONFIG_PM
27 * sysfs.c
30 extern int dpm_sysfs_add(struct device *);
31 extern void dpm_sysfs_remove(struct device *);
33 #else /* CONFIG_PM */
35 static inline int dpm_sysfs_add(struct device *dev)
37 return 0;
40 static inline void dpm_sysfs_remove(struct device *dev)
44 #endif