Skip to content

Commit

Permalink
Staging: quickstart: Use switch-case in quickstart_acpi_notify
Browse files Browse the repository at this point in the history
Signed-off-by: Szymon Janc <szymon@janc.net.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Szymon Janc authored and Greg Kroah-Hartman committed Feb 9, 2012
1 parent ffe1c05 commit 55e4036
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions drivers/staging/quickstart/quickstart.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 55e4036

Please sign in to comment.