aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_fbcon.c
diff options
context:
space:
mode:
authorFabian Frederick <fabf@skynet.be>2014-09-14 12:40:17 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-09-24 06:09:25 -0400
commit918b7ed423ab7c423efe0e71f7670ff9139d3ee0 (patch)
tree81777bb4821279786fa6d60e96b5533e02b8019b /drivers/gpu/drm/nouveau/nouveau_fbcon.c
parenta1d0280e678c4d0074bd994ac53d95d39be9383c (diff)
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: Fabian Frederick <fabf@skynet.be> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_fbcon.c')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_fbcon.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.c b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
index f0ae10ca3ba9..dc1753c368e3 100644
--- a/drivers/gpu/drm/nouveau/nouveau_fbcon.c
+++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
@@ -308,7 +308,8 @@ static int
308nouveau_fbcon_create(struct drm_fb_helper *helper, 308nouveau_fbcon_create(struct drm_fb_helper *helper,
309 struct drm_fb_helper_surface_size *sizes) 309 struct drm_fb_helper_surface_size *sizes)
310{ 310{
311 struct nouveau_fbdev *fbcon = (struct nouveau_fbdev *)helper; 311 struct nouveau_fbdev *fbcon =
312 container_of(helper, struct nouveau_fbdev, helper);
312 struct drm_device *dev = fbcon->dev; 313 struct drm_device *dev = fbcon->dev;
313 struct nouveau_drm *drm = nouveau_drm(dev); 314 struct nouveau_drm *drm = nouveau_drm(dev);
314 struct nvif_device *device = &drm->device; 315 struct nvif_device *device = &drm->device;