diff options
author | Jiri Pirko <jiri@mellanox.com> | 2015-12-11 18:26:00 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-12-12 00:45:37 -0500 |
commit | b626f2cb75cfc9ab707fce6e60df0d94650a4abf (patch) | |
tree | 0625ead6658b4654fcf09c1b8c4c78ed7578f5fc /drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c | |
parent | acf35a4ec6f75bcb1c20c7aa02586de6220d76c5 (diff) | |
download | linux-stable-b626f2cb75cfc9ab707fce6e60df0d94650a4abf.tar.gz linux-stable-b626f2cb75cfc9ab707fce6e60df0d94650a4abf.tar.bz2 linux-stable-b626f2cb75cfc9ab707fce6e60df0d94650a4abf.zip |
mlxsw: core: Fix temperature sensor index during initialization
Sensor index should be passed instead of 0. For now, this does not make
a difference, since there is so far only one temperature sensor
exposed by HW.
Fixes: 89309da39 ("mlxsw: core: Implement temperature hwmon interface")
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c b/drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c index 913106d37bb0..b86db967eab9 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c +++ b/drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c @@ -242,7 +242,7 @@ static int mlxsw_hwmon_temp_init(struct mlxsw_hwmon *mlxsw_hwmon) } sensor_count = mlxsw_reg_mtcap_sensor_count_get(mtcap_pl); for (i = 0; i < sensor_count; i++) { - mlxsw_reg_mtmp_pack(mtmp_pl, 0, true, true); + mlxsw_reg_mtmp_pack(mtmp_pl, i, true, true); err = mlxsw_reg_write(mlxsw_hwmon->core, MLXSW_REG(mtmp), mtmp_pl); if (err) { |