提交 ad75bd85 编写于 作者: H Hans de Goede

platform/x86: sony-laptop: Don't turn off 0x153 keyboard backlight during probe

The 0x153 version of the kbd backlight control SNC handle has no separate
address to probe if the backlight is there.

This turns the probe call into a set keyboard backlight call with a value
of 0 turning off the keyboard backlight.

Skip probing when there is no separate probe address to avoid this.

Link: https://bugzilla.redhat.com/show_bug.cgi?id=1583752
Fixes: 800f2017 ("Keyboard backlight control for some Vaio Fit models")
Signed-off-by: NHans de Goede <hdegoede@redhat.com>
Reviewed-by: NMattia Dongili <malattia@linux.it>
Link: https://lore.kernel.org/r/20221213122943.11123-1-hdegoede@redhat.com
上级 1b929c02
......@@ -1887,6 +1887,12 @@ static int sony_nc_kbd_backlight_setup(struct platform_device *pd,
break;
}
/*
* Only probe if there is a separate probe_base, otherwise the probe call
* is equivalent to __sony_nc_kbd_backlight_mode_set(0), resulting in
* the keyboard backlight being turned off.
*/
if (probe_base) {
ret = sony_call_snc_handle(handle, probe_base, &result);
if (ret)
return ret;
......@@ -1896,6 +1902,7 @@ static int sony_nc_kbd_backlight_setup(struct platform_device *pd,
dprintk("no backlight keyboard found\n");
return 0;
}
}
kbdbl_ctl = kzalloc(sizeof(*kbdbl_ctl), GFP_KERNEL);
if (!kbdbl_ctl)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册