egl/drm: use gbm_dri_bo() wrapper
authorEmil Velikov <emil.velikov@collabora.com>
Thu, 9 Aug 2018 14:13:07 +0000 (15:13 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Fri, 24 Aug 2018 10:53:24 +0000 (11:53 +0100)
Remove the explicit cast, using the appropriate wrapper instead.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
Acked-by: Daniel Stone <daniels@collabora.com>
src/egl/drivers/dri2/platform_drm.c

index a0b4862e837b2f54058cc93d91e3301769bc15b3..7538b3c7a45e94166e98317d31d88015f3b259ba 100644 (file)
@@ -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;