summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzymon Janc <szymon@janc.net.pl>2012-01-11 23:22:44 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-02-08 17:16:49 -0800
commit55e403698642fc39e37c2a8d30aa6fa55c9ae116 (patch)
tree76bd99ab45bbe78b0e26903132d316ae596d357e
parentffe1c0565c27324f6e23a5b47ae5ff873553c62f (diff)
Staging: quickstart: Use switch-case in quickstart_acpi_notify
Signed-off-by: Szymon Janc <szymon@janc.net.pl> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/quickstart/quickstart.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/staging/quickstart/quickstart.c b/drivers/staging/quickstart/quickstart.c
index b183d215336e..17e57c037e00 100644
--- a/drivers/staging/quickstart/quickstart.c
+++ b/drivers/staging/quickstart/quickstart.c
@@ -180,15 +180,19 @@ static void quickstart_acpi_notify(acpi_handle handle, u32 event, void *data)
if (!quickstart)
return;
- if (event == QUICKSTART_EVENT_WAKE)
+ switch (event) {
+ case QUICKSTART_EVENT_WAKE:
quickstart_data.pressed = quickstart->btn;
- else if (event == QUICKSTART_EVENT_RUNTIME) {
+ break;
+ case QUICKSTART_EVENT_RUNTIME:
input_report_key(quickstart_input, quickstart->btn->id, 1);
input_sync(quickstart_input);
input_report_key(quickstart_input, quickstart->btn->id, 0);
input_sync(quickstart_input);
+ break;
+ default:
+ break;
}
- return;
}
static int quickstart_acpi_ghid(struct quickstart_acpi *quickstart)