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

drm/gma500: use container_of to resolve psb_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>
上级 f38e34ac
......@@ -540,7 +540,8 @@ static void psbfb_gamma_get(struct drm_crtc *crtc, u16 *red,
static int psbfb_probe(struct drm_fb_helper *helper,
struct drm_fb_helper_surface_size *sizes)
{
struct psb_fbdev *psb_fbdev = (struct psb_fbdev *)helper;
struct psb_fbdev *psb_fbdev =
container_of(helper, struct psb_fbdev, psb_fb_helper);
struct drm_device *dev = psb_fbdev->psb_fb_helper.dev;
struct drm_psb_private *dev_priv = dev->dev_private;
int bytespp;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册