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

drm/radeon: use container_of to resolve radeon_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 98cc0343
......@@ -189,7 +189,8 @@ static int radeonfb_create_pinned_object(struct radeon_fbdev *rfbdev,
static int radeonfb_create(struct drm_fb_helper *helper,
struct drm_fb_helper_surface_size *sizes)
{
struct radeon_fbdev *rfbdev = (struct radeon_fbdev *)helper;
struct radeon_fbdev *rfbdev =
container_of(helper, struct radeon_fbdev, helper);
struct radeon_device *rdev = rfbdev->rdev;
struct fb_info *info;
struct drm_framebuffer *fb = NULL;
......
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