Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'platform-drivers-x86-v6.3-5' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86

Pull x86 platform driver fixes from Hans de Goede:

- more think-lmi fixes

- one DMI quirk addition

* tag 'platform-drivers-x86-v6.3-5' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86:
platform/x86: thinkpad_acpi: Add missing T14s Gen1 type to s2idle quirk list
platform/x86: think-lmi: Clean up display of current_value on Thinkstation
platform/x86: think-lmi: Fix memory leaks when parsing ThinkStation WMI strings
platform/x86: think-lmi: Fix memory leak when showing current settings

+21 -7
+13 -7
drivers/platform/x86/think-lmi.c
··· 920 920 static ssize_t current_value_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) 921 921 { 922 922 struct tlmi_attr_setting *setting = to_tlmi_attr_setting(kobj); 923 - char *item, *value; 923 + char *item, *value, *p; 924 924 int ret; 925 925 926 926 ret = tlmi_setting(setting->index, &item, LENOVO_BIOS_SETTING_GUID); ··· 930 930 /* validate and split from `item,value` -> `value` */ 931 931 value = strpbrk(item, ","); 932 932 if (!value || value == item || !strlen(value + 1)) 933 - return -EINVAL; 934 - 935 - ret = sysfs_emit(buf, "%s\n", value + 1); 933 + ret = -EINVAL; 934 + else { 935 + /* On Workstations remove the Options part after the value */ 936 + p = strchrnul(value, ';'); 937 + *p = '\0'; 938 + ret = sysfs_emit(buf, "%s\n", value + 1); 939 + } 936 940 kfree(item); 941 + 937 942 return ret; 938 943 } 939 944 ··· 1462 1457 * name string. 1463 1458 * Try and pull that out if it's available. 1464 1459 */ 1465 - char *item, *optstart, *optend; 1460 + char *optitem, *optstart, *optend; 1466 1461 1467 - if (!tlmi_setting(setting->index, &item, LENOVO_BIOS_SETTING_GUID)) { 1468 - optstart = strstr(item, "[Optional:"); 1462 + if (!tlmi_setting(setting->index, &optitem, LENOVO_BIOS_SETTING_GUID)) { 1463 + optstart = strstr(optitem, "[Optional:"); 1469 1464 if (optstart) { 1470 1465 optstart += strlen("[Optional:"); 1471 1466 optend = strstr(optstart, "]"); ··· 1474 1469 kstrndup(optstart, optend - optstart, 1475 1470 GFP_KERNEL); 1476 1471 } 1472 + kfree(optitem); 1477 1473 } 1478 1474 } 1479 1475 /*
+8
drivers/platform/x86/thinkpad_acpi.c
··· 4479 4479 } 4480 4480 }, 4481 4481 { 4482 + .ident = "T14s Gen1 AMD", 4483 + .driver_data = &quirk_s2idle_bug, 4484 + .matches = { 4485 + DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"), 4486 + DMI_MATCH(DMI_PRODUCT_NAME, "20UJ"), 4487 + } 4488 + }, 4489 + { 4482 4490 .ident = "P14s Gen1 AMD", 4483 4491 .driver_data = &quirk_s2idle_bug, 4484 4492 .matches = {