]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
UBUNTU: SAUCE: platform/x86: dell-uart-backlight: load driver by scalar status
authorAceLan Kao <acelan.kao@canonical.com>
Thu, 7 Nov 2019 06:36:00 +0000 (07:36 +0100)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 4 Dec 2019 09:29:26 +0000 (10:29 +0100)
BugLink: https://bugs.launchpad.net/bugs/1813877
Leverage the scalar status command to determinate whether the driver
should be loaded or not.

Signed-off-by: AceLan Kao <acelan.kao@canonical.com>
Acked-by: Seth Forshee <seth.forshee@canonical.com>
Acked-by: Connor Kuehl <connor.kuehl@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/platform/x86/dell-uart-backlight.c

index f957da1a452a7bcc7a7c915bd17a9eddda281b35..a1ec0067291fcab1b9924992be050cb1fd291a16 100644 (file)
@@ -382,14 +382,11 @@ static int dell_uart_bl_add(struct acpi_device *dev)
        mutex_init(&dell_pdata->brightness_mutex);
 
        if (!dell_uart_get_scalar_status(dell_pdata)) {
-               udelay(50);
-               /* try another command to make sure there is no scalar IC */
-               if (dell_uart_show_firmware_ver(dell_pdata) <= 0) {
-                       pr_debug("Scalar is not in charge of brightness adjustment.\n");
-                       kzfree(dell_pdata);
-                       return -1;
-               }
+               pr_debug("Scalar is not in charge of brightness adjustment.\n");
+               kzfree(dell_pdata);
+               return -1;
        }
+       dell_uart_show_firmware_ver(dell_pdata);
 
        memset(&props, 0, sizeof(struct backlight_properties));
        props.type = BACKLIGHT_PLATFORM;