Skip to content

Commit 62e36b2

Browse files
hkallweitPaolo Abeni
authored andcommitted
net: phy: realtek: remove call to devm_hwmon_sanitize_name
Since c909e68 ("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 <[email protected]> Link: https://patch.msgid.link/[email protected] Reviewed-by: Maxime Chevallier <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
1 parent 3fed9fd commit 62e36b2

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

drivers/net/phy/realtek/realtek_hwmon.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,16 +63,11 @@ static const struct hwmon_chip_info rtl822x_hwmon_chip_info = {
6363
int rtl822x_hwmon_init(struct phy_device *phydev)
6464
{
6565
struct device *hwdev, *dev = &phydev->mdio.dev;
66-
const char *name;
6766

6867
/* Ensure over-temp alarm is reset. */
6968
phy_clear_bits_mmd(phydev, MDIO_MMD_VEND2, RTL822X_VND2_TSALRM, 3);
7069

71-
name = devm_hwmon_sanitize_name(dev, dev_name(dev));
72-
if (IS_ERR(name))
73-
return PTR_ERR(name);
74-
75-
hwdev = devm_hwmon_device_register_with_info(dev, name, phydev,
70+
hwdev = devm_hwmon_device_register_with_info(dev, NULL, phydev,
7671
&rtl822x_hwmon_chip_info,
7772
NULL);
7873
return PTR_ERR_OR_ZERO(hwdev);

0 commit comments

Comments
 (0)