blob: 5c4efd493fa503919b787ed6e5f6d3a4747282c5 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
2 * shutdown.c
3 */
4
Linus Torvalds1da177e2005-04-16 15:20:36 -07005extern void device_shutdown(void);
6
7
Rafael J. Wysocki296699d2007-07-29 23:27:18 +02008#ifdef CONFIG_PM_SLEEP
Linus Torvalds1da177e2005-04-16 15:20:36 -07009
10/*
11 * main.c
12 */
13
Alan Sterncd59abf2007-09-21 15:36:56 -040014extern struct list_head dpm_active; /* The active device list */
Linus Torvalds1da177e2005-04-16 15:20:36 -070015
16static inline struct device * to_device(struct list_head * entry)
17{
Alan Sterncd59abf2007-09-21 15:36:56 -040018 return container_of(entry, struct device, power.entry);
Linus Torvalds1da177e2005-04-16 15:20:36 -070019}
20
21extern int device_pm_add(struct device *);
22extern void device_pm_remove(struct device *);
23
24/*
25 * sysfs.c
26 */
27
28extern int dpm_sysfs_add(struct device *);
29extern void dpm_sysfs_remove(struct device *);
30
Rafael J. Wysocki296699d2007-07-29 23:27:18 +020031#else /* CONFIG_PM_SLEEP */
Linus Torvalds1da177e2005-04-16 15:20:36 -070032
33
34static inline int device_pm_add(struct device * dev)
35{
36 return 0;
37}
38static inline void device_pm_remove(struct device * dev)
39{
40
41}
42
Linus Torvalds1da177e2005-04-16 15:20:36 -070043#endif