hwmon: introduce hwmon_sanitize_name()
More and more drivers will check for bad characters in the hwmon name and all are using the same code snippet. Consolidate that code by adding a new hwmon_sanitize_name() function. Signed-off-by: Michael Walle <michael@walle.cc> Reviewed-by: Tom Rix <trix@redhat.com> Link: https://lore.kernel.org/r/20220405092452.4033674-2-michael@walle.ccSigned-off-by: Guenter Roeck <linux@roeck-us.net>
Showing
Please register or sign in to comment