提交 918b7ed4 编写于 作者: F Fabian Frederick 提交者: Daniel Vetter

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