writeback: safer lock nesting
[linux/fpc-iii.git] / include / acpi / button.h
blob3a2b8535dec6c4eaba511e1a445d3c0f187fddec
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef ACPI_BUTTON_H
3 #define ACPI_BUTTON_H
5 #include <linux/notifier.h>
7 #if IS_ENABLED(CONFIG_ACPI_BUTTON)
8 extern int acpi_lid_notifier_register(struct notifier_block *nb);
9 extern int acpi_lid_notifier_unregister(struct notifier_block *nb);
10 extern int acpi_lid_open(void);
11 #else
12 static inline int acpi_lid_notifier_register(struct notifier_block *nb)
14 return 0;
16 static inline int acpi_lid_notifier_unregister(struct notifier_block *nb)
18 return 0;
20 static inline int acpi_lid_open(void)
22 return 1;
24 #endif /* IS_ENABLED(CONFIG_ACPI_BUTTON) */
26 #endif /* ACPI_BUTTON_H */