Explorar o código

mlxsw: reg: Fix max temperature getting

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>
Jiri Pirko %!s(int64=9) %!d(string=hai) anos
pai
achega
acf35a4ec6
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      drivers/net/ethernet/mellanox/mlxsw/reg.h

+ 1 - 1
drivers/net/ethernet/mellanox/mlxsw/reg.h

@@ -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)