Subject: [PATCH] [acpi button] Simplify event handling - Change handler to updated type - Get rid of duplicate check for correct events - Just set data, and return 0.. Signed-off-by: Patrick Mochel --- drivers/acpi/drivers/button/event.c | 20 ++++---------------- 1 files changed, 4 insertions(+), 16 deletions(-) applies-to: 55b12545ec7251c3effbba470d51cf7bf91ec87c b2f75f242f5183dac38030ee7305d9f182a123b9 diff --git a/drivers/acpi/drivers/button/event.c b/drivers/acpi/drivers/button/event.c index 2b5d8ef..848609d 100644 --- a/drivers/acpi/drivers/button/event.c +++ b/drivers/acpi/drivers/button/event.c @@ -12,26 +12,14 @@ #define ACPI_BUTTON_NOTIFY_STATUS 0x80 -static void button_notify(acpi_handle handle, u32 event, void * data) + +static int button_notify(struct acpi_dev * ad, u32 event, int * data) { - struct acpi_dev * ad = data; struct acpi_button * ab = dev_get_drvdata(&ad->dev); - - ACPI_FUNCTION_TRACE(FUNCTION); - - switch (event) { - case ACPI_BUTTON_NOTIFY_STATUS: - acpi_bus_generate_event(ab->b_ad->acpi_device, event, - ++ab->b_count); - break; - default: - dbg("Unsupported event [0x%x]\n", event); - break; - } - return_VOID; + *data = ++ab->b_count; + return 0; } - declare_acpi_events(button, acpi_event_raise(ACPI_BUTTON_NOTIFY_STATUS)); declare_acpi_fixed(button, --- 0.99.9.GIT