mbox series

[v2,0/1,SRU,OEM-OSP1-B] UBUNTU: SAUCE: Don't register platform::micmute if the related tokens don't exist.

Message ID 20200515062504.6619-1-koba.ko@canonical.com
Headers show
Series UBUNTU: SAUCE: Don't register platform::micmute if the related tokens don't exist. | expand

Message

Koba Ko May 15, 2020, 6:25 a.m. UTC
BugLink: https://bugs.launchpad.net/bugs/1877275

[Impact]
Error messge is issued during boot up,
"platform::micmute: Setting an LED's brightness failed (-19)",
but there's no micmute led on the machine.

[Fix]
Get the related tokens of SMBIOS, GLOBAL_MIC_MUTE_DISABLE/ENABLE.
If one of two tokens doesn't exist, don't register platform::micmute.
After that, you wouldn't see the platform::micmute in /sys/class/leds/,
and the error message wouldn't see in dmesg.

[test]
With the patch, if GLOBAL_MIC_MUTE_DISABLE/ENABLE don't exist, the error message
wouldn't be triggered and can't find platform::micmute in /sys/class/leds

[Regression Potential]
low, just avoid to register if device isn't presented.

v2: Before call led_classdev_unregister, check whether micumute exists or
not.

Koba Ko (1):
  UBUNTU: SAUCE: platform/x86: dell-laptop: don't register
    platform::micmute if the related tokens don't exist

 drivers/platform/x86/dell-laptop.c | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)