From: Michal Srb Date: Fri, 23 Nov 2018 15:02:27 +0000 (+0100) Subject: gallium: Constify drisw_loader_funcs struct X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c0ac038c97b89a8266375339c297b17b3700dfb0;p=mesa.git gallium: Constify drisw_loader_funcs struct The content is not expected to change. Cc: mesa-stable@lists.freedesktop.org Signed-off-by: Michal Srb Reviewed-by: Emil Velikov --- diff --git a/src/gallium/auxiliary/pipe-loader/pipe_loader.h b/src/gallium/auxiliary/pipe-loader/pipe_loader.h index 05be94cae31..9b264145347 100644 --- a/src/gallium/auxiliary/pipe-loader/pipe_loader.h +++ b/src/gallium/auxiliary/pipe-loader/pipe_loader.h @@ -142,7 +142,7 @@ pipe_loader_release(struct pipe_loader_device **devs, int ndev); */ bool pipe_loader_sw_probe_dri(struct pipe_loader_device **devs, - struct drisw_loader_funcs *drisw_lf); + const struct drisw_loader_funcs *drisw_lf); /** * Initialize a kms backed sw device given an fd. diff --git a/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c b/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c index d387ce90d32..587b6f8567b 100644 --- a/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c +++ b/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c @@ -132,7 +132,7 @@ pipe_loader_sw_probe_teardown_common(struct pipe_loader_sw_device *sdev) #ifdef HAVE_PIPE_LOADER_DRI bool -pipe_loader_sw_probe_dri(struct pipe_loader_device **devs, struct drisw_loader_funcs *drisw_lf) +pipe_loader_sw_probe_dri(struct pipe_loader_device **devs, const struct drisw_loader_funcs *drisw_lf) { struct pipe_loader_sw_device *sdev = CALLOC_STRUCT(pipe_loader_sw_device); int i; diff --git a/src/gallium/winsys/sw/dri/dri_sw_winsys.c b/src/gallium/winsys/sw/dri/dri_sw_winsys.c index d519bcfedd3..cd44b036c6f 100644 --- a/src/gallium/winsys/sw/dri/dri_sw_winsys.c +++ b/src/gallium/winsys/sw/dri/dri_sw_winsys.c @@ -62,7 +62,7 @@ struct dri_sw_winsys { struct sw_winsys base; - struct drisw_loader_funcs *lf; + const struct drisw_loader_funcs *lf; }; static inline struct dri_sw_displaytarget * @@ -282,7 +282,7 @@ dri_destroy_sw_winsys(struct sw_winsys *winsys) } struct sw_winsys * -dri_create_sw_winsys(struct drisw_loader_funcs *lf) +dri_create_sw_winsys(const struct drisw_loader_funcs *lf) { struct dri_sw_winsys *ws; diff --git a/src/gallium/winsys/sw/dri/dri_sw_winsys.h b/src/gallium/winsys/sw/dri/dri_sw_winsys.h index 329ac06a05b..47e3777d4cd 100644 --- a/src/gallium/winsys/sw/dri/dri_sw_winsys.h +++ b/src/gallium/winsys/sw/dri/dri_sw_winsys.h @@ -33,6 +33,6 @@ struct sw_winsys; -struct sw_winsys *dri_create_sw_winsys(struct drisw_loader_funcs *lf); +struct sw_winsys *dri_create_sw_winsys(const struct drisw_loader_funcs *lf); #endif