diff options
author | Fabian Frederick <fabf@skynet.be> | 2014-09-14 18:40:22 +0200 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-09-24 12:09:28 +0200 |
commit | ee0d68ab5f0997a500fdf90924a58e787b216292 (patch) | |
tree | ee965436534ffe64feeb611f7834fe1996a7d215 | |
parent | 0d634f6e5b0d1d6e2b044b23d448ab5fb7c102e5 (diff) |
drm/udl: use container_of to resolve udl_fbdev from drm_fb_helpertopic/core-stuff-2014-09-24
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>
-rw-r--r-- | drivers/gpu/drm/udl/udl_fb.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/udl/udl_fb.c b/drivers/gpu/drm/udl/udl_fb.c index d1da339843ca..8cbcb4589bd3 100644 --- a/drivers/gpu/drm/udl/udl_fb.c +++ b/drivers/gpu/drm/udl/udl_fb.c @@ -472,7 +472,8 @@ udl_framebuffer_init(struct drm_device *dev, static int udlfb_create(struct drm_fb_helper *helper, struct drm_fb_helper_surface_size *sizes) { - struct udl_fbdev *ufbdev = (struct udl_fbdev *)helper; + struct udl_fbdev *ufbdev = + container_of(helper, struct udl_fbdev, helper); struct drm_device *dev = ufbdev->helper.dev; struct fb_info *info; struct device *device = dev->dev; |