platform/x86: dell-privacy: Fix SW_CAMERA_LENS_COVER reporting
authorHans de Goede <hdegoede@redhat.com>
Wed, 21 Dec 2022 22:07:23 +0000 (23:07 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Jan 2023 10:48:50 +0000 (11:48 +0100)
commitc90cf47d309aef341f2d8c8373945ab5fb29e59d
treea5f38d4e9e4e6790692ed1fa9db0eda829251350
parent25b5f693bc2d153047192c124e1f8bac28d2dee9
platform/x86: dell-privacy: Fix SW_CAMERA_LENS_COVER reporting

commit 1af7fef0d9d3fa075bf4e850f705df1fe97d33ce upstream.

Use KE_VSW instead of KE_SW for the SW_CAMERA_LENS_COVER key_entry
and get the value of the switch from the status field when handling
SW_CAMERA_LENS_COVER events, instead of always reporting 0.

Also correctly set the initial SW_CAMERA_LENS_COVER value.

Fixes: 8af9fa37b8a3 ("platform/x86: dell-privacy: Add support for Dell hardware privacy")
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20221221220724.119594-1-hdegoede@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/platform/x86/dell/dell-wmi-privacy.c