tuxonice_storage.h 890 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * kernel/power/tuxonice_storage.h
  3. *
  4. * Copyright (C) 2005-2014 Nigel Cunningham (nigel at tuxonice net)
  5. *
  6. * This file is released under the GPLv2.
  7. */
  8. #ifdef CONFIG_NET
  9. int toi_prepare_usm(void);
  10. void toi_cleanup_usm(void);
  11. int toi_activate_storage(int force);
  12. int toi_deactivate_storage(int force);
  13. extern int toi_usm_init(void);
  14. extern void toi_usm_exit(void);
  15. #else
  16. static inline int toi_usm_init(void) { return 0; }
  17. static inline void toi_usm_exit(void) { }
  18. static inline int toi_activate_storage(int force)
  19. {
  20. return 0;
  21. }
  22. static inline int toi_deactivate_storage(int force)
  23. {
  24. return 0;
  25. }
  26. static inline int toi_prepare_usm(void) { return 0; }
  27. static inline void toi_cleanup_usm(void) { }
  28. #endif
  29. enum {
  30. USM_MSG_BASE = 0x10,
  31. /* Kernel -> Userspace */
  32. USM_MSG_CONNECT = 0x30,
  33. USM_MSG_DISCONNECT = 0x31,
  34. USM_MSG_SUCCESS = 0x40,
  35. USM_MSG_FAILED = 0x41,
  36. USM_MSG_MAX,
  37. };