NAK/CMNT: [PATCH 1/1][SRU][OEM-5.6] UBUNTU: SAUCE: platform/x86: dell-laptop: don't register platform::micmute if the related tokens don't exist.
Sultan Alsawaf
sultan.alsawaf at canonical.com
Wed May 13 17:34:23 UTC 2020
Hi,
You say that this is a sauce patch, but there's this line in your commit msg:
> (cherry picked from commit f0a165c6311a4b8c7b45bafcb4806f105f0e7aa1)
I didn't find that commit hash in Linus' tree. Is this patch a cherry pick of an
upstream commit, or is it an original sauce patch?
If it is a sauce patch, please remove the "cherry picked from" line from your
commit message (and the duplicate s-o-b line), and resubmit.
Thanks,
Sultan
On Thu, May 07, 2020 at 07:07:22PM +0800, koba.ko at canonical.com wrote:
> From: Koba Ko <koba.ko at canonical.com>
>
> BugLink: https://bugs.launchpad.net/bugs/1877275
>
> Error messge is issued,
> "platform::micmute: Setting an LED's brightness failed (-19)",
> Even the device isn't presented.
>
> Get the related tokens of SMBIOS, GLOBAL_MIC_MUTE_DISABLE/ENABLE.
> If one of two tokens doesn't exist, don't register platform::micmute.
>
> Signed-off-by: Koba Ko <koba.ko at canonical.com>
> (cherry picked from commit f0a165c6311a4b8c7b45bafcb4806f105f0e7aa1)
> Signed-off-by: Koba Ko <koba.ko at canonical.com>
> ---
> drivers/platform/x86/dell-laptop.c | 11 +++++++----
> 1 file changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c
> index 74e988f839e8..4c1dd1d4e60b 100644
> --- a/drivers/platform/x86/dell-laptop.c
> +++ b/drivers/platform/x86/dell-laptop.c
> @@ -2204,10 +2204,13 @@ static int __init dell_init(void)
>
> dell_laptop_register_notifier(&dell_laptop_notifier);
>
> - micmute_led_cdev.brightness = ledtrig_audio_get(LED_AUDIO_MICMUTE);
> - ret = led_classdev_register(&platform_device->dev, &micmute_led_cdev);
> - if (ret < 0)
> - goto fail_led;
> + if (dell_smbios_find_token(GLOBAL_MIC_MUTE_DISABLE) &&
> + dell_smbios_find_token(GLOBAL_MIC_MUTE_ENABLE)) {
> + micmute_led_cdev.brightness = ledtrig_audio_get(LED_AUDIO_MICMUTE);
> + ret = led_classdev_register(&platform_device->dev, &micmute_led_cdev);
> + if (ret < 0)
> + goto fail_led;
> + }
>
> if (acpi_video_get_backlight_type() != acpi_backlight_vendor)
> return 0;
> --
> 2.17.1
>
>
> --
> kernel-team mailing list
> kernel-team at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team
More information about the kernel-team
mailing list