]> git.baikalelectronics.ru Git - kernel.git/commit
hwmon: (pmbus) Replace - with _ in device names before registration
authorChris Packham <chris.packham@alliedtelesis.co.nz>
Wed, 17 Mar 2021 04:02:30 +0000 (17:02 +1300)
committerGuenter Roeck <linux@roeck-us.net>
Tue, 20 Apr 2021 13:50:14 +0000 (06:50 -0700)
commitd0a1241549bce52f522e68c9a08c142d4f0cd8db
tree94a41b2d8b272e60c3d990216d6d1f39cbebc88b
parent85d9f6632a077ccb0e4dc77d36d51cd3ac5080f9
hwmon: (pmbus) Replace - with _ in device names before registration

The hwmon sysfs ABI requires that the `name` property doesn't include
any dashes. But when the pmbus code picks the name up from the device
tree it quite often does. Replace '-' with '_' before registering the
device.

Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Link: https://lore.kernel.org/r/20210317040231.21490-2-chris.packham@alliedtelesis.co.nz
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/pmbus/pmbus_core.c