[PATCH 09/16] Staging: quickstart: Use switch-case in quickstart_acpi_notify

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Szymon Janc <szymon@xxxxxxxxxxx>
---
 drivers/staging/quickstart/quickstart.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/quickstart/quickstart.c b/drivers/staging/quickstart/quickstart.c
index b183d21..17e57c0 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)
-- 
1.7.8.2


--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux