Skip to content
Commit 5fe052b8 authored by Hans de Goede's avatar Hans de Goede Committed by Greg Kroah-Hartman
Browse files

platform/x86: asus-wmi: Simplify tablet-mode-switch handling



[ Upstream commit 1ea0d3b4 ]

Simplify tablet-mode-switch handling:
1. The code is the same for all variants, the only difference is the
   dev_id and notify event code. Store the dev_id + code in struct asus_wmi
   and unify the handling
2. Make the new unified asus_wmi_tablet_mode_get_state() check dev_id has
   been set and make it a no-op when not set. This allows calling it
   unconditionally at resume/restore time
3. Simplify the tablet_mode_sw module-param handling, this also allows
   selecting the new lid-flip-rog type through the module-param.

Cc: Luke D. Jones <luke@ljones.dev>
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20220824151145.1448010-2-hdegoede@redhat.com


Stable-dep-of: b52cbca2 ("platform/x86: asus-wmi: Move i8042 filter install to shared asus-wmi code")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent a113da75
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment