]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
drm/amd/display: make function tables const
authorChristian König <christian.koenig@amd.com>
Fri, 6 Jul 2018 12:19:07 +0000 (14:19 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 10 Jul 2018 19:17:11 +0000 (14:17 -0500)
It is good practice to make global function tables const to avoid
accidental override.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.c
drivers/gpu/drm/amd/display/dc/dce110/dce110_mem_input_v.c
drivers/gpu/drm/amd/display/dc/inc/hw/mem_input.h

index bae752332a9f7f2baea5d59f9c367d5b5b61a56e..85686d9176364e0373248c4808eb631b5169173a 100644 (file)
@@ -729,7 +729,7 @@ static bool dce_mi_program_surface_flip_and_addr(
        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,
        .allocate_mem_input = dce_mi_allocate_dmif,
        .free_mem_input = dce_mi_free_dmif,
@@ -741,7 +741,7 @@ static struct mem_input_funcs dce_mi_funcs = {
        .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,
        .allocate_mem_input = dce_mi_allocate_dmif,
        .free_mem_input = dce_mi_free_dmif,
@@ -753,7 +753,7 @@ static struct mem_input_funcs dce112_mi_funcs = {
        .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,
        .allocate_mem_input = dce_mi_allocate_dmif,
        .free_mem_input = dce_mi_free_dmif,
index 0564c8e312529a6d4133ca1d0010172ca8c187da..9b9fc3d96c0712c83e843531c14cb59db67b9727 100644 (file)
@@ -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 =
                        dce_mem_input_v_program_display_marks,
        .mem_input_program_chroma_display_marks =
index 47f1dc5a43b74ffab7b429e1d5975a2b07fa8f3d..da89c2edb07c758034d640045201465833dfa245 100644 (file)
@@ -64,7 +64,7 @@ struct stutter_modes {
 };
 
 struct mem_input {
-       struct mem_input_funcs *funcs;
+       const struct mem_input_funcs *funcs;
        struct dc_context *ctx;
        struct dc_plane_address request_address;
        struct dc_plane_address current_address;