Subject: [PATCH] [acpi button] Add fixed event handling - Declare fixed events to listen for (fixed-feature power and sleep buttons) - Declare a acpi_device_event_fixed() to install them Signed-off-by: Patrick Mochel --- drivers/acpi/drivers/button/event.c | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-) applies-to: 083ab6c3844412b54d5b697b912e34cf229ea770 40585d2203664fb715bd2cfaa28473bd358c7033 diff --git a/drivers/acpi/drivers/button/event.c b/drivers/acpi/drivers/button/event.c index e7fe09a..0b5517f 100644 --- a/drivers/acpi/drivers/button/event.c +++ b/drivers/acpi/drivers/button/event.c @@ -12,9 +12,10 @@ #define ACPI_BUTTON_NOTIFY_STATUS 0x80 -static void button_notify(acpi_handle handle, u32 event, void *data) +static void button_notify(acpi_handle handle, u32 event, void * data) { - struct acpi_button * ab = data; + struct acpi_dev * ad = data; + struct acpi_button * ab = dev_get_drvdata(&ad->dev); ACPI_FUNCTION_TRACE(FUNCTION); @@ -30,5 +31,9 @@ static void button_notify(acpi_handle ha return_VOID; } +static u32 button_fixed[] = { + ACPI_EVENT_POWER_BUTTON, + ACPI_EVENT_SLEEP_BUTTON, +}; -acpi_device_event(button); +acpi_device_event_fixed(button, ACPI_BUTTON_NOTIFY_STATUS); --- 0.99.9.GIT