hwmon: (iio_hwmon) Simplify attr.name generation in iio_hwmon_probe()
Since every call to devm_kasprintf() in the switch statement is mostly the same, we can move all of the shared code outside and capture differencies with two helper variables. No functional change intended. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Cc: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Showing
Please register or sign in to comment