From 081395e99deabf10dea374ff54067c936a9a61a9 Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Thu, 9 Aug 2018 15:13:07 +0100 Subject: [PATCH] egl/drm: use gbm_dri_bo() wrapper Remove the explicit cast, using the appropriate wrapper instead. Signed-off-by: Emil Velikov Reviewed-by: Eric Engestrom Acked-by: Daniel Stone --- src/egl/drivers/dri2/platform_drm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/egl/drivers/dri2/platform_drm.c b/src/egl/drivers/dri2/platform_drm.c index a0b4862e837..7538b3c7a45 100644 --- a/src/egl/drivers/dri2/platform_drm.c +++ b/src/egl/drivers/dri2/platform_drm.c @@ -305,7 +305,7 @@ back_bo_to_dri_buffer(struct dri2_egl_surface *dri2_surf, __DRIbuffer *buffer) struct gbm_dri_bo *bo; int name, pitch; - bo = (struct gbm_dri_bo *) dri2_surf->back->bo; + bo = gbm_dri_bo(dri2_surf->back->bo); dri2_dpy->image->queryImage(bo->image, __DRI_IMAGE_ATTRIB_NAME, &name); dri2_dpy->image->queryImage(bo->image, __DRI_IMAGE_ATTRIB_STRIDE, &pitch); @@ -409,7 +409,7 @@ dri2_drm_image_get_buffers(__DRIdrawable *driDrawable, if (get_back_bo(dri2_surf) < 0) return 0; - bo = (struct gbm_dri_bo *) dri2_surf->back->bo; + bo = gbm_dri_bo(dri2_surf->back->bo); buffers->image_mask = __DRI_IMAGE_BUFFER_BACK; buffers->back = bo->image; -- 2.30.2