Unverified Commit f7b70665 authored by Kai-Heng Feng's avatar Kai-Heng Feng Committed by Ilpo Järvinen
Browse files

platform/x86: asus-wmi: Consider device is absent when the read is ~0



AAEON PICO-TGU4 board doesn't have any LED but there are bogus LED
controls under /sys/class/leds:
$ ls /sys/class/leds
asus::kbd_backlight asus::lightbar  platform::micmute

The reason is that the ~0 read from asus_wmi_get_devstate() is treated
as a valid state, in truth it means the device is absent.

So filter out ~0 read to prevent bogus LED controls being created.

Signed-off-by: default avatarKai-Heng Feng <kai.heng.feng@canonical.com>
Reviewed-by: default avatarIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20240308053255.224496-1-kai.heng.feng@canonical.com


Signed-off-by: default avatarIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
parent e9df5436
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment