Skip to content

Commit 5a3fc7a

Browse files
mrhpearsonjwrdegoede
authored andcommitted
platform/x86: thinkpad_acpi: Simplify known_ev handling
Modify how known_ev event is handled in preparation for adding new hkey event range. Signed-off-by: Mark Pearson <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Hans de Goede <[email protected]> Tested-by: Mark Pearson <[email protected]> Signed-off-by: Hans de Goede <[email protected]> Reviewed-by: Mark Pearson <[email protected]> Reviewed-by: Ilpo Järvinen <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 7545dc7 commit 5a3fc7a

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

drivers/platform/x86/thinkpad_acpi.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3845,6 +3845,7 @@ static void hotkey_notify(struct ibm_struct *ibm, u32 event)
38453845
}
38463846

38473847
send_acpi_ev = true;
3848+
known_ev = false;
38483849

38493850
switch (hkey >> 12) {
38503851
case 1:
@@ -3868,8 +3869,6 @@ static void hotkey_notify(struct ibm_struct *ibm, u32 event)
38683869
/* FIXME: kick libata if SATA link offline */
38693870
known_ev = true;
38703871
break;
3871-
default:
3872-
known_ev = false;
38733872
}
38743873
break;
38753874
case 4:
@@ -3892,11 +3891,8 @@ static void hotkey_notify(struct ibm_struct *ibm, u32 event)
38923891
tpacpi_send_radiosw_update();
38933892
send_acpi_ev = 0;
38943893
known_ev = true;
3895-
break;
38963894
}
3897-
fallthrough; /* to default */
3898-
default:
3899-
known_ev = false;
3895+
break;
39003896
}
39013897
if (!known_ev) {
39023898
pr_notice("unhandled HKEY event 0x%04x\n", hkey);

0 commit comments

Comments
 (0)