mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-27 21:03:32 +00:00
drm/sun4i: Unbind components before releasing DRM and memory
Our components may still be using the DRM device driver (if only to
access our driver's private data), so make sure to unbind them before
the final drm_dev_put.
Also release our reserved memory after component unbind instead of
before to match reverse creation order.
Fixes: f5a9ed867c
("drm/sun4i: Fix component unbinding and component master deletion")
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190424090413.6918-1-paul.kocialkowski@bootlin.com
This commit is contained in:
parent
d08106796a
commit
e02bc29b2c
1 changed files with 3 additions and 2 deletions
|
@ -149,10 +149,11 @@ static void sun4i_drv_unbind(struct device *dev)
|
|||
drm_kms_helper_poll_fini(drm);
|
||||
drm_atomic_helper_shutdown(drm);
|
||||
drm_mode_config_cleanup(drm);
|
||||
of_reserved_mem_device_release(dev);
|
||||
drm_dev_put(drm);
|
||||
|
||||
component_unbind_all(dev, NULL);
|
||||
of_reserved_mem_device_release(dev);
|
||||
|
||||
drm_dev_put(drm);
|
||||
}
|
||||
|
||||
static const struct component_master_ops sun4i_drv_master_ops = {
|
||||
|
|
Loading…
Reference in a new issue