Hi 2023. március 17., péntek 16:46 keltezéssel, Mark Pearson <mpearson-lenovo@xxxxxxxxx> írta: > firmware-attributes class requires that possible values are delimited > using ';' but the Lenovo firmware uses ',' instead. > Parse string and replace where appropriate > > Thanks to Thomas W for pointing this out. > > Signed-off-by: Mark Pearson <mpearson-lenovo@xxxxxxxxx> > --- > [...] > + /* > + * firmware-attributes requires that possible_values are separated by ';' but > + * Lenovo FW uses ','. Replace appropriately. > + */ > + if (setting->possible_values) { > + char *tmp = setting->possible_values; > + > + while ((tmp = strchr(tmp, ',')) != NULL) > + *tmp++ = ';'; > + } Please see `strreplace()` from `linux/string.h`. > + > kobject_init(&setting->kobj, &tlmi_attr_setting_ktype); > tlmi_priv.setting[i] = setting; > kfree(item); > -- > 2.39.2 Regards, Barnabás Pőcze