button.h 652 B

1234567891011121314151617181920212223242526
  1. #ifndef ACPI_BUTTON_H
  2. #define ACPI_BUTTON_H
  3. #include <linux/notifier.h>
  4. #if defined(CONFIG_ACPI_BUTTON) || defined(CONFIG_ACPI_BUTTON_MODULE)
  5. extern int acpi_lid_notifier_register(struct notifier_block *nb);
  6. extern int acpi_lid_notifier_unregister(struct notifier_block *nb);
  7. extern int acpi_lid_open(void);
  8. #else
  9. static inline int acpi_lid_notifier_register(struct notifier_block *nb)
  10. {
  11. return 0;
  12. }
  13. static inline int acpi_lid_notifier_unregister(struct notifier_block *nb)
  14. {
  15. return 0;
  16. }
  17. static inline int acpi_lid_open(void)
  18. {
  19. return 1;
  20. }
  21. #endif /* defined(CONFIG_ACPI_BUTTON) || defined(CONFIG_ACPI_BUTTON_MODULE) */
  22. #endif /* ACPI_BUTTON_H */