]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
platform/x86: asus-wmi: Simplify tablet-mode-switch probing
authorHans de Goede <hdegoede@redhat.com>
Wed, 24 Aug 2022 15:11:44 +0000 (17:11 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Dec 2023 17:36:33 +0000 (18:36 +0100)
commitf277c14b6d5feb8f1e480c10fd17378df64a1242
tree866da08b45f2f75ba1ece1be604fd168f8c2006c
parent36ede1474698882df90b5426e746b80d9e708ec2
platform/x86: asus-wmi: Simplify tablet-mode-switch probing

[ Upstream commit c98dc61ee08f833e68337700546e120e2edac7c9 ]

The 3 different tablet-mode-switch initialization paths repeat a lot
of the same code. Add a helper function for this.

This also makes the error-handling for the kbd_dock_devid case consistent
with the other 2 cases.

Cc: Luke D. Jones <luke@ljones.dev>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20220824151145.1448010-1-hdegoede@redhat.com
Stable-dep-of: b52cbca22cbf ("platform/x86: asus-wmi: Move i8042 filter install to shared asus-wmi code")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/platform/x86/asus-wmi.c