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

drm/qxl: use container_of to resolve qxl_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>
上级 5ee932d0
......@@ -625,7 +625,8 @@ static int qxl_fb_find_or_create_single(
struct drm_fb_helper *helper,
struct drm_fb_helper_surface_size *sizes)
{
struct qxl_fbdev *qfbdev = (struct qxl_fbdev *)helper;
struct qxl_fbdev *qfbdev =
container_of(helper, struct qxl_fbdev, helper);
int new_fb = 0;
int ret;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册