diff options
author | Fabian Frederick <fabf@skynet.be> | 2014-09-14 16:40:17 (GMT) |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-09-24 10:09:25 (GMT) |
commit | 918b7ed423ab7c423efe0e71f7670ff9139d3ee0 (patch) | |
tree | 81777bb4821279786fa6d60e96b5533e02b8019b /drivers | |
parent | a1d0280e678c4d0074bd994ac53d95d39be9383c (diff) | |
download | linux-918b7ed423ab7c423efe0e71f7670ff9139d3ee0.tar.xz |
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')
-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 f0ae10c..dc1753c 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; |