mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 19:08:57 +09:00
drm/sun4i: Set device driver data at bind time for use in unbind
[ Upstream commit02b92adbe3] 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:9026e0d122("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 Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
6abfbc045b
commit
cd7e3fd25e
@@ -137,6 +137,8 @@ static int sun4i_drv_bind(struct device *dev)
|
||||
ret = -ENOMEM;
|
||||
goto free_drm;
|
||||
}
|
||||
|
||||
dev_set_drvdata(dev, drm);
|
||||
drm->dev_private = drv;
|
||||
|
||||
drm_vblank_init(drm, 1);
|
||||
|
||||
Reference in New Issue
Block a user