Skip to content

Commit

Permalink
drm/qxl: use container_of to resolve qxl_fbdev from drm_fb_helper
Browse files Browse the repository at this point in the history
Use container_of instead of casting first structure member.

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
  • Loading branch information
Fabian Frederick authored and Daniel Vetter committed Sep 24, 2014
1 parent 5ee932d commit f38e34a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/gpu/drm/qxl/qxl_fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit f38e34a

Please sign in to comment.