hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/drivers/platform/x86/sony-laptop.c
....@@ -1892,14 +1892,21 @@
18921892 break;
18931893 }
18941894
1895
- ret = sony_call_snc_handle(handle, probe_base, &result);
1896
- if (ret)
1897
- return ret;
1895
+ /*
1896
+ * Only probe if there is a separate probe_base, otherwise the probe call
1897
+ * is equivalent to __sony_nc_kbd_backlight_mode_set(0), resulting in
1898
+ * the keyboard backlight being turned off.
1899
+ */
1900
+ if (probe_base) {
1901
+ ret = sony_call_snc_handle(handle, probe_base, &result);
1902
+ if (ret)
1903
+ return ret;
18981904
1899
- if ((handle == 0x0137 && !(result & 0x02)) ||
1900
- !(result & 0x01)) {
1901
- dprintk("no backlight keyboard found\n");
1902
- return 0;
1905
+ if ((handle == 0x0137 && !(result & 0x02)) ||
1906
+ !(result & 0x01)) {
1907
+ dprintk("no backlight keyboard found\n");
1908
+ return 0;
1909
+ }
19031910 }
19041911
19051912 kbdbl_ctl = kzalloc(sizeof(*kbdbl_ctl), GFP_KERNEL);