summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabian Frederick <fabf@skynet.be>2014-09-14 18:40:19 +0200
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-09-24 12:09:26 +0200
commitf38e34ac54569756963827434d4b18b9ad9d8b95 (patch)
tree0b19effe27e9ae456e3310c5c8764ee00a6a3294
parent5ee932d049a4e6e1e134f521dbb98fdd3993a8e9 (diff)
downloadop-kernel-dev-f38e34ac54569756963827434d4b18b9ad9d8b95.zip
op-kernel-dev-f38e34ac54569756963827434d4b18b9ad9d8b95.tar.gz
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: Fabian Frederick <fabf@skynet.be> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r--drivers/gpu/drm/qxl/qxl_fb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/qxl/qxl_fb.c b/drivers/gpu/drm/qxl/qxl_fb.c
index df56788..3d7c1d0 100644
--- a/drivers/gpu/drm/qxl/qxl_fb.c
+++ b/drivers/gpu/drm/qxl/qxl_fb.c
@@ -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;
OpenPOWER on IntegriCloud