From: Fabian Frederick Date: Sun, 14 Sep 2014 16:40:19 +0000 (+0200) Subject: drm/qxl: use container_of to resolve qxl_fbdev from drm_fb_helper X-Git-Tag: firefly_0821_release~176^2~3035^2~7^2~4 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=f38e34ac54569756963827434d4b18b9ad9d8b95;p=firefly-linux-kernel-4.4.55.git drm/qxl: use container_of to resolve qxl_fbdev from drm_fb_helper Use container_of instead of casting first structure member. Signed-off-by: Fabian Frederick Signed-off-by: Daniel Vetter --- diff --git a/drivers/gpu/drm/qxl/qxl_fb.c b/drivers/gpu/drm/qxl/qxl_fb.c index df567888bb1e..3d7c1d00a424 100644 --- a/drivers/gpu/drm/qxl/qxl_fb.c +++ b/drivers/gpu/drm/qxl/qxl_fb.c @@ -625,7 +625,8 @@ static int qxl_fb_find_or_create_single( struct drm_fb_helper *helper, struct drm_fb_helper_surface_size *sizes) { - struct qxl_fbdev *qfbdev = (struct qxl_fbdev *)helper; + struct qxl_fbdev *qfbdev = + container_of(helper, struct qxl_fbdev, helper); int new_fb = 0; int ret;