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>
{
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) {