mlxsw: reg: Fix max temperature getting
authorJiri Pirko <jiri@mellanox.com>
Fri, 11 Dec 2015 15:10:39 +0000 (16:10 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 12 Dec 2015 05:45:37 +0000 (00:45 -0500)
Fix copy & paste error in MTPM unpack helper.

Fixes: 85926f877040 ("mlxsw: reg: Add definition of temperature management registers")
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/reg.h

index 4e4e4dcf054ff2f5987122d29ca5740e5b10010a..af631df4603a5f7f3199a556080fb1b2b554e794 100644 (file)
@@ -2684,7 +2684,7 @@ static inline void mlxsw_reg_mtmp_unpack(char *payload, unsigned int *p_temp,
                *p_temp = MLXSW_REG_MTMP_TEMP_TO_MC(temp);
        }
        if (p_max_temp) {
-               temp = mlxsw_reg_mtmp_temperature_get(payload);
+               temp = mlxsw_reg_mtmp_max_temperature_get(payload);
                *p_max_temp = MLXSW_REG_MTMP_TEMP_TO_MC(temp);
        }
        if (sensor_name)