summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorPaul Kocialkowski <paul.kocialkowski@bootlin.com>2019-04-18 15:27:26 +0200
committerMaxime Ripard <maxime.ripard@bootlin.com>2019-04-18 16:26:36 +0200
commit02b92adbe33e6dbd15dc6e32540b22f47c4ff0a2 (patch)
tree5ac7d625b794b45b8544cd83908ea82de4fbc445 /drivers
parent71adf60f0a925c0e0c7dc2d0311fe40b825be737 (diff)
drm/sun4i: Set device driver data at bind time for use in unbind
Our sun4i_drv_unbind gets the drm device using dev_get_drvdata. However, that driver data is never set in sun4i_drv_bind. Set it there to avoid getting a NULL pointer at unbind time. Fixes: 9026e0d122ac ("drm: Add Allwinner A10 Display Engine support") Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com> Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190418132727.5128-3-paul.kocialkowski@bootlin.com
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/sun4i/sun4i_drv.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/sun4i/sun4i_drv.c b/drivers/gpu/drm/sun4i/sun4i_drv.c
index c5871b15714f..8abaabde08ab 100644
--- a/drivers/gpu/drm/sun4i/sun4i_drv.c
+++ b/drivers/gpu/drm/sun4i/sun4i_drv.c
@@ -86,6 +86,8 @@ static int sun4i_drv_bind(struct device *dev)
ret = -ENOMEM;
goto free_drm;
}
+
+ dev_set_drvdata(dev, drm);
drm->dev_private = drv;
INIT_LIST_HEAD(&drv->frontend_list);
INIT_LIST_HEAD(&drv->engine_list);