diff options
author | Fabian Frederick <fabf@skynet.be> | 2014-09-14 18:40:17 +0200 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-09-24 12:09:25 +0200 |
commit | 918b7ed423ab7c423efe0e71f7670ff9139d3ee0 (patch) | |
tree | 81777bb4821279786fa6d60e96b5533e02b8019b /drivers/gpu/drm/nouveau | |
parent | a1d0280e678c4d0074bd994ac53d95d39be9383c (diff) | |
download | blackbird-op-linux-918b7ed423ab7c423efe0e71f7670ff9139d3ee0.tar.gz blackbird-op-linux-918b7ed423ab7c423efe0e71f7670ff9139d3ee0.zip |
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')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_fbcon.c | 3 |
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 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; |