Commit cb202bb8 authored by Andrey Smirnov's avatar Andrey Smirnov Committed by Guenter Roeck
Browse files

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: default avatarAndrey Smirnov <andrew.smirnov@gmail.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent 5aaa5873
Supports Markdown
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