]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitd60446e92f1e7e290f625ef111e47e6e8040213b
treef3ecded347a6c175e05e10e0cf2faf980af76426
parentb6f44af98a51a1fa370468e25770018bd9c1ecbb
platform/x86: dell-privacy: Fix SW_CAMERA_LENS_COVER reporting

commit 47c2d7cae8b50dcd204f3ffe96dd250310d41a14 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: 69b231f15cf9 ("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