[PATCH 2/3][SRU][B][C][D] UBUNTU: SAUCE: platform/x86: dell-uart-backlight: load driver by scalar status
AceLan Kao
acelan.kao at canonical.com
Wed Jan 30 09:10:25 UTC 2019
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 at canonical.com>
---
drivers/platform/x86/dell-uart-backlight.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/drivers/platform/x86/dell-uart-backlight.c b/drivers/platform/x86/dell-uart-backlight.c
index f957da1a452a..a1ec0067291f 100644
--- a/drivers/platform/x86/dell-uart-backlight.c
+++ b/drivers/platform/x86/dell-uart-backlight.c
@@ -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;
--
2.17.1
More information about the kernel-team
mailing list