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:58:16 +0000 (11:58 +0100)
commitdfa4ff480fe6d7b401a8d2f707b0228c4664de13
treef3ecded347a6c175e05e10e0cf2faf980af76426
parent0e082105895c448ea8b20daf881c3e2759ed7e15
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