net: phy: marvell-88q2xxx: remove call to devm_hwmon_sanitize_name
authorHeiner Kallweit <hkallweit1@gmail.com>
Thu, 13 Mar 2025 19:46:22 +0000 (20:46 +0100)
committerPaolo Abeni <pabeni@redhat.com>
Fri, 21 Mar 2025 17:05:30 +0000 (18:05 +0100)
Since c909e68f8127 ("hwmon: (core) Use device name as a fallback in
devm_hwmon_device_register_with_info") we can simply provide NULL
as name argument.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Link: https://patch.msgid.link/59c485e4-983c-42f6-9114-916703a62e3f@gmail.com
Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/phy/marvell-88q2xxx.c

index 15c0f8adc2f5391e8ee30b68641314a60d8b0a0d..23e1f0521f54985b226f3918bf724d97b8240279 100644 (file)
@@ -765,16 +765,10 @@ static int mv88q2xxx_hwmon_probe(struct phy_device *phydev)
        struct mv88q2xxx_priv *priv = phydev->priv;
        struct device *dev = &phydev->mdio.dev;
        struct device *hwmon;
-       char *hwmon_name;
 
        priv->enable_temp = true;
-       hwmon_name = devm_hwmon_sanitize_name(dev, dev_name(dev));
-       if (IS_ERR(hwmon_name))
-               return PTR_ERR(hwmon_name);
 
-       hwmon = devm_hwmon_device_register_with_info(dev,
-                                                    hwmon_name,
-                                                    phydev,
+       hwmon = devm_hwmon_device_register_with_info(dev, NULL, phydev,
                                                     &mv88q2xxx_hwmon_chip_info,
                                                     NULL);