From ebf5b2336591e659b50a5256b1a61bfdd9c4325b Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Tue, 12 Oct 2021 15:21:00 +0200 Subject: [PATCH] mt7615/mt7915: fix hwmon device name the "-" character is rejected by the subsystem for device names Signed-off-by: Felix Fietkau --- mt7615/init.c | 2 +- mt7915/init.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mt7615/init.c b/mt7615/init.c index 2c5d35ba..47f23ac9 100644 --- a/mt7615/init.c +++ b/mt7615/init.c @@ -54,7 +54,7 @@ int mt7615_thermal_init(struct mt7615_dev *dev) if (!IS_REACHABLE(CONFIG_HWMON)) return 0; - name = devm_kasprintf(&wiphy->dev, GFP_KERNEL, "mt7615-%s", + name = devm_kasprintf(&wiphy->dev, GFP_KERNEL, "mt7615_%s", wiphy_name(wiphy)); hwmon = devm_hwmon_device_register_with_groups(&wiphy->dev, name, dev, mt7615_hwmon_groups); diff --git a/mt7915/init.c b/mt7915/init.c index a269808b..8f63127b 100644 --- a/mt7915/init.c +++ b/mt7915/init.c @@ -162,7 +162,7 @@ static int mt7915_thermal_init(struct mt7915_phy *phy) struct device *hwmon; const char *name; - name = devm_kasprintf(&wiphy->dev, GFP_KERNEL, "mt7915-%s", + name = devm_kasprintf(&wiphy->dev, GFP_KERNEL, "mt7915_%s", wiphy_name(wiphy)); cdev = thermal_cooling_device_register(name, phy, &mt7915_thermal_ops);