Skip to content
Commit b92fe9e3 authored by Sanchayan Maity's avatar Sanchayan Maity Committed by Guenter Roeck
Browse files

hwmon: (iio_hwmon) Allow the driver to accept hypen in device tree node names



Currently the driver calls hwmon_device_register_with_groups which
does not accept hypen in node name and returns EINVAL. Use of hypen
in device tree node name results in probe failure., however use of
hypen in device tree node name is perfectly acceptable.

Change this by allocating a duplicate managed string, replacing
hypen with underscore and then calling hwmon_device_register_with_groups.
This allows the use of hypen in device tree node name while maintaining
backwards compatibility and preventing any possible regressions with
user space.

Signed-off-by: default avatarSanchayan Maity <maitysanchayan@gmail.com>
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent df922703
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