mlxsw: Constify devlink_resource_ops

devlink_resource_ops should be const as the arg of register function is
also const.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Jiri Pirko 2018-04-01 17:34:52 +03:00 коммит произвёл David S. Miller
Родитель c8276dd250
Коммит f9b9120119
2 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -3815,7 +3815,7 @@ static u64 mlxsw_sp_resource_kvd_linear_occ_get(struct devlink *devlink)
return mlxsw_sp_kvdl_occ_get(mlxsw_sp);
}
static struct devlink_resource_ops mlxsw_sp_resource_kvd_linear_ops = {
static const struct devlink_resource_ops mlxsw_sp_resource_kvd_linear_ops = {
.occ_get = mlxsw_sp_resource_kvd_linear_occ_get,
};

Просмотреть файл

@ -408,15 +408,15 @@ static u64 mlxsw_sp_kvdl_large_chunks_occ_get(struct devlink *devlink)
return mlxsw_sp_kvdl_part_occ(part);
}
static struct devlink_resource_ops mlxsw_sp_kvdl_single_ops = {
static const struct devlink_resource_ops mlxsw_sp_kvdl_single_ops = {
.occ_get = mlxsw_sp_kvdl_single_occ_get,
};
static struct devlink_resource_ops mlxsw_sp_kvdl_chunks_ops = {
static const struct devlink_resource_ops mlxsw_sp_kvdl_chunks_ops = {
.occ_get = mlxsw_sp_kvdl_chunks_occ_get,
};
static struct devlink_resource_ops mlxsw_sp_kvdl_chunks_large_ops = {
static const struct devlink_resource_ops mlxsw_sp_kvdl_chunks_large_ops = {
.occ_get = mlxsw_sp_kvdl_large_chunks_occ_get,
};