Skip to content

Commit

Permalink
drm/nouveau: use container_of to resolve nouveau_fbdev from drm_fb_he…
Browse files Browse the repository at this point in the history
…lper

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 a1d0280 commit 918b7ed
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/gpu/drm/nouveau/nouveau_fbcon.c
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,8 @@ static int
nouveau_fbcon_create(struct drm_fb_helper *helper,
struct drm_fb_helper_surface_size *sizes)
{
struct nouveau_fbdev *fbcon = (struct nouveau_fbdev *)helper;
struct nouveau_fbdev *fbcon =
container_of(helper, struct nouveau_fbdev, helper);
struct drm_device *dev = fbcon->dev;
struct nouveau_drm *drm = nouveau_drm(dev);
struct nvif_device *device = &drm->device;
Expand Down

0 comments on commit 918b7ed

Please sign in to comment.