egl/drm: use gbm_dri_device() wrapper
authorEmil Velikov <emil.velikov@collabora.com>
Thu, 9 Aug 2018 14:05:58 +0000 (15:05 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Fri, 24 Aug 2018 10:52:48 +0000 (11:52 +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 35bc4b5b1acc4708de48fcf86638b90ef9a6b806..d42ef6b2f9578d5c3d4395e3a07a148b68471ba9 100644 (file)
@@ -45,7 +45,7 @@ lock_front_buffer(struct gbm_surface *_surf)
 {
    struct gbm_dri_surface *surf = (struct gbm_dri_surface *) _surf;
    struct dri2_egl_surface *dri2_surf = surf->dri_private;
-   struct gbm_dri_device *device = (struct gbm_dri_device *) _surf->gbm;
+   struct gbm_dri_device *device = gbm_dri_device(_surf->gbm);
    struct gbm_bo *bo;
 
    if (dri2_surf->current == NULL) {