提交 a1d0280e 编写于 作者: F Fabian Frederick 提交者: 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: NFabian Frederick <fabf@skynet.be>
Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册