2021-10-27 18:46:41 +05:00
|
|
|
#ifndef ACPI_BUTTON_H
|
|
|
|
#define ACPI_BUTTON_H
|
|
|
|
|
2021-11-13 09:26:51 +05:00
|
|
|
#include <linux/notifier.h>
|
2021-10-27 18:46:41 +05:00
|
|
|
|
|
|
|
#if IS_ENABLED(CONFIG_ACPI_BUTTON)
|
2021-11-13 09:26:51 +05:00
|
|
|
extern int acpi_lid_notifier_register(struct notifier_block *nb);
|
|
|
|
extern int acpi_lid_notifier_unregister(struct notifier_block *nb);
|
2021-10-27 18:46:41 +05:00
|
|
|
extern int acpi_lid_open(void);
|
|
|
|
#else
|
2021-11-13 09:26:51 +05:00
|
|
|
static inline int acpi_lid_notifier_register(struct notifier_block *nb)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
static inline int acpi_lid_notifier_unregister(struct notifier_block *nb)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2021-10-27 18:46:41 +05:00
|
|
|
static inline int acpi_lid_open(void)
|
|
|
|
{
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
#endif /* IS_ENABLED(CONFIG_ACPI_BUTTON) */
|
|
|
|
|
|
|
|
#endif /* ACPI_BUTTON_H */
|