From: Jiri Pirko Date: Fri, 11 Dec 2015 15:10:39 +0000 (+0100) Subject: mlxsw: reg: Fix max temperature getting X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=acf35a4ec6f75bcb1c20c7aa02586de6220d76c5;p=openwrt%2Fstaging%2Fblogic.git 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 Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/mellanox/mlxsw/reg.h b/drivers/net/ethernet/mellanox/mlxsw/reg.h index 4e4e4dcf054f..af631df4603a 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/reg.h +++ b/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)