summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/va
diff options
context:
space:
mode:
authorEmil Velikov <[email protected]>2016-11-25 17:52:28 +0000
committerEmil Velikov <[email protected]>2017-05-19 19:46:46 +0100
commitc34a008891626e9fa76324676a71e5928fd9c0fb (patch)
tree4ab6e6807bbb1a99d93c62e2ebf418ef09f11170 /src/gallium/state_trackers/va
parent369e5dd939b4af6c653d6cbbe9be257a9c2c950e (diff)
st/va: move variable declaration to where its used
... and make it const, since we shouldn't tinker with it. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Nayan Deshmukh <[email protected]> Reviewed-by: Christian König <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/va')
-rw-r--r--src/gallium/state_trackers/va/context.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gallium/state_trackers/va/context.c b/src/gallium/state_trackers/va/context.c
index 5159fceac91..a44634c4428 100644
--- a/src/gallium/state_trackers/va/context.c
+++ b/src/gallium/state_trackers/va/context.c
@@ -103,7 +103,6 @@ PUBLIC VAStatus
VA_DRIVER_INIT_FUNC(VADriverContextP ctx)
{
vlVaDriver *drv;
- struct drm_state *drm_info;
if (!ctx)
return VA_STATUS_ERROR_INVALID_CONTEXT;
@@ -127,7 +126,7 @@ VA_DRIVER_INIT_FUNC(VADriverContextP ctx)
case VA_DISPLAY_WAYLAND:
case VA_DISPLAY_DRM:
case VA_DISPLAY_DRM_RENDERNODES: {
- drm_info = (struct drm_state *) ctx->drm_state;
+ const struct drm_state *drm_info = (struct drm_state *) ctx->drm_state;
if (!drm_info || drm_info->fd < 0) {
FREE(drv);