提交 a14cc842 编写于 作者: C Christian König 提交者: Alex Deucher

drm/amd/display: make function tables const

It is good practice to make global function tables const to avoid
accidental override.
Signed-off-by: NChristian König <christian.koenig@amd.com>
Reviewed-by: NHarry Wentland <harry.wentland@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 10e7fddd
...@@ -729,7 +729,7 @@ static bool dce_mi_program_surface_flip_and_addr( ...@@ -729,7 +729,7 @@ static bool dce_mi_program_surface_flip_and_addr(
return true; return true;
} }
static struct mem_input_funcs dce_mi_funcs = { static const struct mem_input_funcs dce_mi_funcs = {
.mem_input_program_display_marks = dce_mi_program_display_marks, .mem_input_program_display_marks = dce_mi_program_display_marks,
.allocate_mem_input = dce_mi_allocate_dmif, .allocate_mem_input = dce_mi_allocate_dmif,
.free_mem_input = dce_mi_free_dmif, .free_mem_input = dce_mi_free_dmif,
...@@ -741,7 +741,7 @@ static struct mem_input_funcs dce_mi_funcs = { ...@@ -741,7 +741,7 @@ static struct mem_input_funcs dce_mi_funcs = {
.mem_input_is_flip_pending = dce_mi_is_flip_pending .mem_input_is_flip_pending = dce_mi_is_flip_pending
}; };
static struct mem_input_funcs dce112_mi_funcs = { static const struct mem_input_funcs dce112_mi_funcs = {
.mem_input_program_display_marks = dce112_mi_program_display_marks, .mem_input_program_display_marks = dce112_mi_program_display_marks,
.allocate_mem_input = dce_mi_allocate_dmif, .allocate_mem_input = dce_mi_allocate_dmif,
.free_mem_input = dce_mi_free_dmif, .free_mem_input = dce_mi_free_dmif,
...@@ -753,7 +753,7 @@ static struct mem_input_funcs dce112_mi_funcs = { ...@@ -753,7 +753,7 @@ static struct mem_input_funcs dce112_mi_funcs = {
.mem_input_is_flip_pending = dce_mi_is_flip_pending .mem_input_is_flip_pending = dce_mi_is_flip_pending
}; };
static struct mem_input_funcs dce120_mi_funcs = { static const struct mem_input_funcs dce120_mi_funcs = {
.mem_input_program_display_marks = dce120_mi_program_display_marks, .mem_input_program_display_marks = dce120_mi_program_display_marks,
.allocate_mem_input = dce_mi_allocate_dmif, .allocate_mem_input = dce_mi_allocate_dmif,
.free_mem_input = dce_mi_free_dmif, .free_mem_input = dce_mi_free_dmif,
......
...@@ -1011,7 +1011,7 @@ void dce110_free_mem_input_v( ...@@ -1011,7 +1011,7 @@ void dce110_free_mem_input_v(
{ {
} }
static struct mem_input_funcs dce110_mem_input_v_funcs = { static const struct mem_input_funcs dce110_mem_input_v_funcs = {
.mem_input_program_display_marks = .mem_input_program_display_marks =
dce_mem_input_v_program_display_marks, dce_mem_input_v_program_display_marks,
.mem_input_program_chroma_display_marks = .mem_input_program_chroma_display_marks =
......
...@@ -64,7 +64,7 @@ struct stutter_modes { ...@@ -64,7 +64,7 @@ struct stutter_modes {
}; };
struct mem_input { struct mem_input {
struct mem_input_funcs *funcs; const struct mem_input_funcs *funcs;
struct dc_context *ctx; struct dc_context *ctx;
struct dc_plane_address request_address; struct dc_plane_address request_address;
struct dc_plane_address current_address; struct dc_plane_address current_address;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册