Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 918b7ed4 authored by Fabian Frederick's avatar Fabian Frederick Committed by Daniel Vetter
Browse files

drm/nouveau: use container_of to resolve nouveau_fbdev from drm_fb_helper



Use container_of instead of casting first structure member.

Signed-off-by: default avatarFabian Frederick <fabf@skynet.be>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent a1d0280e
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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;