Skip to content
Commit 409ef0ba authored by Marc Zyngier's avatar Marc Zyngier Committed by Eduardo Valentin
Browse files

thermal_hwmon: Sanitize attribute name passed to hwmon



My Chromebook Plus (kevin) is spitting the following at boot time:

(NULL device *): hwmon: 'sbs-9-000b' is not a valid name attribute, please fix

Clearly, __hwmon_device_register is unhappy about the property name.
Some investigation reveals that thermal_add_hwmon_sysfs doesn't
sanitize the name of the attribute.

In order to keep it quiet, let's replace '-' with '_' in hwmon->type
This is consistent with what iio-hwmon does since b92fe9e3.

Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
Tested-by: default avatarEnric Balletbo i Serra <enric.balletbo@collabora.com>
Signed-off-by: default avatarEduardo Valentin <edubezval@gmail.com>
parent 59d7f4a7
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment