Commit af25c16b authored by Daniel Vetter's avatar Daniel Vetter

drm/v3d: Don't set drm_device->dev_private

And switch the helper over to container_of, which is a bunch faster
than chasing a pointer. Plus allows gcc to see through this maze.
Acked-by: default avatarEric Anholt <eric@anholt.net>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
Cc: Eric Anholt <eric@anholt.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20200415074034.175360-8-daniel.vetter@ffwll.ch
parent 4cc9b565
......@@ -265,7 +265,6 @@ static int v3d_platform_drm_probe(struct platform_device *pdev)
}
platform_set_drvdata(pdev, drm);
drm->dev_private = v3d;
drmm_add_final_kfree(drm, v3d);
ret = map_regs(v3d, &v3d->hub_regs, "hub");
......
......@@ -121,7 +121,7 @@ struct v3d_dev {
static inline struct v3d_dev *
to_v3d_dev(struct drm_device *dev)
{
return (struct v3d_dev *)dev->dev_private;
return container_of(dev, struct v3d_dev, drm);
}
static inline bool
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment