platform-drivers-x86 for v6.3-5
Highlights: - more think-lmi fixes - 1 DMI quirk addition The following is an automated git shortlog grouped by driver: think-lmi: - Clean up display of current_value on Thinkstation - Fix memory leaks when parsing ThinkStation WMI strings - Fix memory leak when showing current settings thinkpad_acpi: - Add missing T14s Gen1 type to s2idle quirk list -----BEGIN PGP SIGNATURE----- iQFIBAABCAAyFiEEuvA7XScYQRpenhd+kuxHeUQDJ9wFAmQulJoUHGhkZWdvZWRl QHJlZGhhdC5jb20ACgkQkuxHeUQDJ9yDLAgAh4ES4m+fdH41qnzmceISk2b+wZhh z8SACLiTuitAPnUNAYs8yoR/tMYsuRZ7+6zJEaRZjKKjivFPYAamiTcjjprPMx51 b47hzKUXa45NI1WfN3qIcmjHXSb3HzkEstdGBERYExgQrxoMSkJ3RHm2No32iJjP XO136iqheD/suPzFIdcdi3WR+ktCdNuqfHFYcO4SizPPfYr+3fa4TeJIF4E1sMeh f/Kx57apsijp5dIlpntNedcAaSWppuaW4WM71hEdZDaEae+m1bcSXq2XZnJ14LZY /t1CcWxJFqBIyod/hEJERBxi+51Lx9quaSp6JTdmZd0TkHn1ksvnZ9phkQ== =PE0w -----END PGP SIGNATURE----- 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
This commit is contained in:
Коммит
8dfab5237d
|
@ -920,7 +920,7 @@ static ssize_t display_name_show(struct kobject *kobj, struct kobj_attribute *at
|
|||
static ssize_t current_value_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf)
|
||||
{
|
||||
struct tlmi_attr_setting *setting = to_tlmi_attr_setting(kobj);
|
||||
char *item, *value;
|
||||
char *item, *value, *p;
|
||||
int ret;
|
||||
|
||||
ret = tlmi_setting(setting->index, &item, LENOVO_BIOS_SETTING_GUID);
|
||||
|
@ -930,10 +930,15 @@ static ssize_t current_value_show(struct kobject *kobj, struct kobj_attribute *a
|
|||
/* validate and split from `item,value` -> `value` */
|
||||
value = strpbrk(item, ",");
|
||||
if (!value || value == item || !strlen(value + 1))
|
||||
return -EINVAL;
|
||||
|
||||
ret = sysfs_emit(buf, "%s\n", value + 1);
|
||||
ret = -EINVAL;
|
||||
else {
|
||||
/* On Workstations remove the Options part after the value */
|
||||
p = strchrnul(value, ';');
|
||||
*p = '\0';
|
||||
ret = sysfs_emit(buf, "%s\n", value + 1);
|
||||
}
|
||||
kfree(item);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -1457,10 +1462,10 @@ static int tlmi_analyze(void)
|
|||
* name string.
|
||||
* Try and pull that out if it's available.
|
||||
*/
|
||||
char *item, *optstart, *optend;
|
||||
char *optitem, *optstart, *optend;
|
||||
|
||||
if (!tlmi_setting(setting->index, &item, LENOVO_BIOS_SETTING_GUID)) {
|
||||
optstart = strstr(item, "[Optional:");
|
||||
if (!tlmi_setting(setting->index, &optitem, LENOVO_BIOS_SETTING_GUID)) {
|
||||
optstart = strstr(optitem, "[Optional:");
|
||||
if (optstart) {
|
||||
optstart += strlen("[Optional:");
|
||||
optend = strstr(optstart, "]");
|
||||
|
@ -1469,6 +1474,7 @@ static int tlmi_analyze(void)
|
|||
kstrndup(optstart, optend - optstart,
|
||||
GFP_KERNEL);
|
||||
}
|
||||
kfree(optitem);
|
||||
}
|
||||
}
|
||||
/*
|
||||
|
|
|
@ -4478,6 +4478,14 @@ static const struct dmi_system_id fwbug_list[] __initconst = {
|
|||
DMI_MATCH(DMI_PRODUCT_NAME, "20UH"),
|
||||
}
|
||||
},
|
||||
{
|
||||
.ident = "T14s Gen1 AMD",
|
||||
.driver_data = &quirk_s2idle_bug,
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "20UJ"),
|
||||
}
|
||||
},
|
||||
{
|
||||
.ident = "P14s Gen1 AMD",
|
||||
.driver_data = &quirk_s2idle_bug,
|
||||
|
|
Загрузка…
Ссылка в новой задаче