Staging: quickstart: Use switch-case in quickstart_acpi_notify
authorSzymon Janc <szymon@janc.net.pl>
Wed, 11 Jan 2012 22:22:44 +0000 (23:22 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Feb 2012 01:16:49 +0000 (17:16 -0800)
Signed-off-by: Szymon Janc <szymon@janc.net.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/quickstart/quickstart.c

index b183d215336ec1e05cac70343ef424108f641f9d..17e57c037e000ff3324483f5e3e6bcad6c9d87ed 100644 (file)
@@ -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)