power.h 664 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. * shutdown.c
  3. */
  4. extern void device_shutdown(void);
  5. #ifdef CONFIG_PM_SLEEP
  6. /*
  7. * main.c
  8. */
  9. extern struct list_head dpm_active; /* The active device list */
  10. static inline struct device * to_device(struct list_head * entry)
  11. {
  12. return container_of(entry, struct device, power.entry);
  13. }
  14. extern int device_pm_add(struct device *);
  15. extern void device_pm_remove(struct device *);
  16. /*
  17. * sysfs.c
  18. */
  19. extern int dpm_sysfs_add(struct device *);
  20. extern void dpm_sysfs_remove(struct device *);
  21. #else /* CONFIG_PM_SLEEP */
  22. static inline int device_pm_add(struct device * dev)
  23. {
  24. return 0;
  25. }
  26. static inline void device_pm_remove(struct device * dev)
  27. {
  28. }
  29. #endif