Commit bfb82c9c authored by Vadim Pasternak's avatar Vadim Pasternak Committed by David S. Miller

mlxsw: core_thermal: Remove obsolete API for query resource

Remove obsolete API mlxsw_core_res_query_enabled(), which is only
relevant for end-of-life SwitchX-2 ASICs. Support for these ASICs was
removed in commit b0d80c01 ("mlxsw: Remove Mellanox SwitchX-2 ASIC
support").
Signed-off-by: default avatarVadim Pasternak <vadimp@nvidia.com>
Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 009da9fa
...@@ -177,12 +177,6 @@ void *mlxsw_core_driver_priv(struct mlxsw_core *mlxsw_core) ...@@ -177,12 +177,6 @@ void *mlxsw_core_driver_priv(struct mlxsw_core *mlxsw_core)
} }
EXPORT_SYMBOL(mlxsw_core_driver_priv); EXPORT_SYMBOL(mlxsw_core_driver_priv);
bool mlxsw_core_res_query_enabled(const struct mlxsw_core *mlxsw_core)
{
return mlxsw_core->driver->res_query_enabled;
}
EXPORT_SYMBOL(mlxsw_core_res_query_enabled);
bool mlxsw_core_temp_warn_enabled(const struct mlxsw_core *mlxsw_core) bool mlxsw_core_temp_warn_enabled(const struct mlxsw_core *mlxsw_core)
{ {
return mlxsw_core->driver->temp_warn_enabled; return mlxsw_core->driver->temp_warn_enabled;
......
...@@ -35,8 +35,6 @@ unsigned int mlxsw_core_max_ports(const struct mlxsw_core *mlxsw_core); ...@@ -35,8 +35,6 @@ unsigned int mlxsw_core_max_ports(const struct mlxsw_core *mlxsw_core);
void *mlxsw_core_driver_priv(struct mlxsw_core *mlxsw_core); void *mlxsw_core_driver_priv(struct mlxsw_core *mlxsw_core);
bool mlxsw_core_res_query_enabled(const struct mlxsw_core *mlxsw_core);
bool mlxsw_core_temp_warn_enabled(const struct mlxsw_core *mlxsw_core); bool mlxsw_core_temp_warn_enabled(const struct mlxsw_core *mlxsw_core);
bool bool
......
...@@ -655,9 +655,6 @@ static int mlxsw_hwmon_module_init(struct mlxsw_hwmon *mlxsw_hwmon) ...@@ -655,9 +655,6 @@ static int mlxsw_hwmon_module_init(struct mlxsw_hwmon *mlxsw_hwmon)
u8 module_sensor_max; u8 module_sensor_max;
int i, err; int i, err;
if (!mlxsw_core_res_query_enabled(mlxsw_hwmon->core))
return 0;
mlxsw_reg_mgpir_pack(mgpir_pl); mlxsw_reg_mgpir_pack(mgpir_pl);
err = mlxsw_reg_query(mlxsw_hwmon->core, MLXSW_REG(mgpir), mgpir_pl); err = mlxsw_reg_query(mlxsw_hwmon->core, MLXSW_REG(mgpir), mgpir_pl);
if (err) if (err)
......
...@@ -746,9 +746,6 @@ mlxsw_thermal_modules_init(struct device *dev, struct mlxsw_core *core, ...@@ -746,9 +746,6 @@ mlxsw_thermal_modules_init(struct device *dev, struct mlxsw_core *core,
char mgpir_pl[MLXSW_REG_MGPIR_LEN]; char mgpir_pl[MLXSW_REG_MGPIR_LEN];
int i, err; int i, err;
if (!mlxsw_core_res_query_enabled(core))
return 0;
mlxsw_reg_mgpir_pack(mgpir_pl); mlxsw_reg_mgpir_pack(mgpir_pl);
err = mlxsw_reg_query(core, MLXSW_REG(mgpir), mgpir_pl); err = mlxsw_reg_query(core, MLXSW_REG(mgpir), mgpir_pl);
if (err) if (err)
...@@ -793,9 +790,6 @@ mlxsw_thermal_modules_fini(struct mlxsw_thermal *thermal) ...@@ -793,9 +790,6 @@ mlxsw_thermal_modules_fini(struct mlxsw_thermal *thermal)
{ {
int i; int i;
if (!mlxsw_core_res_query_enabled(thermal->core))
return;
for (i = thermal->tz_module_num - 1; i >= 0; i--) for (i = thermal->tz_module_num - 1; i >= 0; i--)
mlxsw_thermal_module_fini(&thermal->tz_module_arr[i]); mlxsw_thermal_module_fini(&thermal->tz_module_arr[i]);
kfree(thermal->tz_module_arr); kfree(thermal->tz_module_arr);
...@@ -843,9 +837,6 @@ mlxsw_thermal_gearboxes_init(struct device *dev, struct mlxsw_core *core, ...@@ -843,9 +837,6 @@ mlxsw_thermal_gearboxes_init(struct device *dev, struct mlxsw_core *core,
int i; int i;
int err; int err;
if (!mlxsw_core_res_query_enabled(core))
return 0;
mlxsw_reg_mgpir_pack(mgpir_pl); mlxsw_reg_mgpir_pack(mgpir_pl);
err = mlxsw_reg_query(core, MLXSW_REG(mgpir), mgpir_pl); err = mlxsw_reg_query(core, MLXSW_REG(mgpir), mgpir_pl);
if (err) if (err)
...@@ -889,9 +880,6 @@ mlxsw_thermal_gearboxes_fini(struct mlxsw_thermal *thermal) ...@@ -889,9 +880,6 @@ mlxsw_thermal_gearboxes_fini(struct mlxsw_thermal *thermal)
{ {
int i; int i;
if (!mlxsw_core_res_query_enabled(thermal->core))
return;
for (i = thermal->tz_gearbox_num - 1; i >= 0; i--) for (i = thermal->tz_gearbox_num - 1; i >= 0; i--)
mlxsw_thermal_gearbox_tz_fini(&thermal->tz_gearbox_arr[i]); mlxsw_thermal_gearbox_tz_fini(&thermal->tz_gearbox_arr[i]);
kfree(thermal->tz_gearbox_arr); kfree(thermal->tz_gearbox_arr);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment