]> git.itanic.dy.fi Git - linux-stable/commitdiff
net: phy: mxl-gpy: rename MMD_VEND1 macros to match datasheet
authorMichael Walle <michael@walle.cc>
Fri, 2 Dec 2022 14:49:00 +0000 (15:49 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 5 Dec 2022 11:54:58 +0000 (11:54 +0000)
Rename the temperature sensors macros to match the names in the
datasheet.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/mxl-gpy.c

index 27c0f161623e5b08621ee0343e849a126fd7a678..0ff7ef076072be915bb2d676adad0e97572fe35d 100644 (file)
@@ -78,8 +78,8 @@
                                 VSPEC1_SGMII_CTRL_ANRS)
 
 /* Temperature sensor */
-#define VPSPEC1_TEMP_STA       0x0E
-#define VPSPEC1_TEMP_STA_DATA  GENMASK(9, 0)
+#define VSPEC1_TEMP_STA        0x0E
+#define VSPEC1_TEMP_STA_DATA   GENMASK(9, 0)
 
 /* WoL */
 #define VPSPEC2_WOL_CTL                0x0E06
@@ -140,14 +140,14 @@ static int gpy_hwmon_read(struct device *dev,
        struct phy_device *phydev = dev_get_drvdata(dev);
        int ret;
 
-       ret = phy_read_mmd(phydev, MDIO_MMD_VEND1, VPSPEC1_TEMP_STA);
+       ret = phy_read_mmd(phydev, MDIO_MMD_VEND1, VSPEC1_TEMP_STA);
        if (ret < 0)
                return ret;
        if (!ret)
                return -ENODATA;
 
        *value = polynomial_calc(&poly_N_to_temp,
-                                FIELD_GET(VPSPEC1_TEMP_STA_DATA, ret));
+                                FIELD_GET(VSPEC1_TEMP_STA_DATA, ret));
 
        return 0;
 }