Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1#ifdef CONFIG_PM_SLEEP
2
3/*
4 * main.c
5 */
6
7extern struct list_head dpm_active; /* The active device list */
8
9static inline struct device *to_device(struct list_head *entry)
10{
11 return container_of(entry, struct device, power.entry);
12}
13
14extern int device_pm_add(struct device *);
15extern void device_pm_remove(struct device *);
16
17#else /* CONFIG_PM_SLEEP */
18
19static inline int device_pm_add(struct device *dev) { return 0; }
20static inline void device_pm_remove(struct device *dev) {}
21
22#endif
23
24#ifdef CONFIG_PM
25
26/*
27 * sysfs.c
28 */
29
30extern int dpm_sysfs_add(struct device *);
31extern void dpm_sysfs_remove(struct device *);
32
33#else /* CONFIG_PM */
34
35static inline int dpm_sysfs_add(struct device *dev)
36{
37 return 0;
38}
39
40static inline void dpm_sysfs_remove(struct device *dev)
41{
42}
43
44#endif