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

From: Ilpo Järvinen
Date: Fri Mar 08 2024 - 03:56:47 EST


On Fri, 8 Mar 2024, Kai-Heng Feng wrote:

> 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: Kai-Heng Feng <kai.heng.feng@xxxxxxxxxxxxx>

Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@xxxxxxxxxxxxxxx>

--
i.