hwmon: (iio_hwmon) Allow the driver to accept hypen in device tree node names
authorSanchayan Maity <maitysanchayan@gmail.com>
Tue, 16 Feb 2016 05:00:53 +0000 (10:30 +0530)
committerGuenter Roeck <linux@roeck-us.net>
Sat, 5 Mar 2016 14:25:34 +0000 (06:25 -0800)
commitb92fe9e3379c8dc885eefb254c3da94c13cc1b6d
treeaf7bf92e2bc14b18dad64957c90a035f3deaa6f3
parentdf922703574ebe9035045f7c7242a0ec0e11b980
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: Sanchayan Maity <maitysanchayan@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/iio_hwmon.c
This page took 0.025181 seconds and 5 git commands to generate.