if (setting->possible_values) {
/* Figure out what setting type is as BIOS does not return this */
- if (strchr(setting->possible_values, ','))
+ if (strchr(setting->possible_values, ';'))
return sysfs_emit(buf, "enumeration\n");
}
/* Anything else is going to be a string */
pr_info("Error retrieving possible values for %d : %s\n",
i, setting->display_name);
}
+ /*
+ * firmware-attributes requires that possible_values are separated by ';' but
+ * Lenovo FW uses ','. Replace appropriately.
+ */
+ if (setting->possible_values)
+ strreplace(setting->possible_values, ',', ';');
+
kobject_init(&setting->kobj, &tlmi_attr_setting_ktype);
tlmi_priv.setting[i] = setting;
kfree(item);