Commit ee0d68ab authored by Fabian Frederick's avatar Fabian Frederick Committed by Daniel Vetter

drm/udl: use container_of to resolve udl_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 0d634f6e
...@@ -472,7 +472,8 @@ udl_framebuffer_init(struct drm_device *dev, ...@@ -472,7 +472,8 @@ udl_framebuffer_init(struct drm_device *dev,
static int udlfb_create(struct drm_fb_helper *helper, static int udlfb_create(struct drm_fb_helper *helper,
struct drm_fb_helper_surface_size *sizes) 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 drm_device *dev = ufbdev->helper.dev;
struct fb_info *info; struct fb_info *info;
struct device *device = dev->dev; struct device *device = dev->dev;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment