Commit c34a0088 authored by Emil Velikov's avatar Emil Velikov Committed by Emil Velikov

st/va: move variable declaration to where its used

... and make it const, since we shouldn't tinker with it.
Signed-off-by: default avatarEmil Velikov <emil.velikov@collabora.com>
Reviewed-by: default avatarNayan Deshmukh <nayan26deshmukh@gmail.com>
Reviewed-by: Christian König's avatarChristian König <christian.koenig@amd.com>
parent 369e5dd9
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment