diff options
author | Vadim Pasternak <vadimp@nvidia.com> | 2022-04-13 18:17:32 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-04-15 13:06:13 +0300 |
commit | 739d56bc635e9ba642777445d8c9c37e4a35ba3c (patch) | |
tree | 3a0ec58f6ac562ad30af028a29b7787c50e0e28f /drivers | |
parent | 6d94449a7d7dca9d4b9b5a2792db537b2b69b4b7 (diff) | |
download | linux-739d56bc635e9ba642777445d8c9c37e4a35ba3c.tar.xz |
mlxsw: core_thermal: Use exact name of cooling devices for binding
Modular system supports additional cooling devices "mlxreg_fan1",
"mlxreg_fan2", etcetera. Thermal zones in "mlxsw" driver should be
bound to the same device as before called "mlxreg_fan". Used exact
match for cooling device name to avoid binding to new additional
cooling devices.
Signed-off-by: Vadim Pasternak <vadimp@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlxsw/core_thermal.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/core_thermal.c b/drivers/net/ethernet/mellanox/mlxsw/core_thermal.c index 23ff214367d3..49ea32457703 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/core_thermal.c +++ b/drivers/net/ethernet/mellanox/mlxsw/core_thermal.c @@ -129,8 +129,7 @@ static int mlxsw_get_cooling_device_idx(struct mlxsw_thermal *thermal, /* Allow mlxsw thermal zone binding to an external cooling device */ for (i = 0; i < ARRAY_SIZE(mlxsw_thermal_external_allowed_cdev); i++) { - if (strnstr(cdev->type, mlxsw_thermal_external_allowed_cdev[i], - strlen(cdev->type))) + if (!strcmp(cdev->type, mlxsw_thermal_external_allowed_cdev[i])) return 0; } |