Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
| 2 | * shutdown.c |
| 3 | */ |
| 4 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5 | extern void device_shutdown(void); |
| 6 | |
| 7 | |
Rafael J. Wysocki | 296699d | 2007-07-29 23:27:18 +0200 | [diff] [blame] | 8 | #ifdef CONFIG_PM_SLEEP |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 9 | |
| 10 | /* |
| 11 | * main.c |
| 12 | */ |
| 13 | |
Alan Stern | cd59abf | 2007-09-21 15:36:56 -0400 | [diff] [blame^] | 14 | extern struct list_head dpm_active; /* The active device list */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 15 | |
| 16 | static inline struct device * to_device(struct list_head * entry) |
| 17 | { |
Alan Stern | cd59abf | 2007-09-21 15:36:56 -0400 | [diff] [blame^] | 18 | return container_of(entry, struct device, power.entry); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 19 | } |
| 20 | |
| 21 | extern int device_pm_add(struct device *); |
| 22 | extern void device_pm_remove(struct device *); |
| 23 | |
| 24 | /* |
| 25 | * sysfs.c |
| 26 | */ |
| 27 | |
| 28 | extern int dpm_sysfs_add(struct device *); |
| 29 | extern void dpm_sysfs_remove(struct device *); |
| 30 | |
Rafael J. Wysocki | 296699d | 2007-07-29 23:27:18 +0200 | [diff] [blame] | 31 | #else /* CONFIG_PM_SLEEP */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 32 | |
| 33 | |
| 34 | static inline int device_pm_add(struct device * dev) |
| 35 | { |
| 36 | return 0; |
| 37 | } |
| 38 | static inline void device_pm_remove(struct device * dev) |
| 39 | { |
| 40 | |
| 41 | } |
| 42 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 43 | #endif |