提交 24b1c849 编写于 作者: P Paul Kocialkowski 提交者: Greg Kroah-Hartman

drm/sun4i: Fix component unbinding and component master deletion

[ Upstream commit f5a9ed867c83875546c9aadd4ed8e785e9adcc3c ]

For our component-backed driver to be properly removed, we need to
delete the component master in sun4i_drv_remove and make sure to call
component_unbind_all in the master's unbind so that all components are
unbound when the master is.

Fixes: 9026e0d1 ("drm: Add Allwinner A10 Display Engine support")
Signed-off-by: NPaul Kocialkowski <paul.kocialkowski@bootlin.com>
Signed-off-by: NMaxime Ripard <maxime.ripard@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190418132727.5128-4-paul.kocialkowski@bootlin.comSigned-off-by: NSasha Levin <sashal@kernel.org>
上级 1973df1e
...@@ -160,6 +160,8 @@ static void sun4i_drv_unbind(struct device *dev) ...@@ -160,6 +160,8 @@ static void sun4i_drv_unbind(struct device *dev)
drm_mode_config_cleanup(drm); drm_mode_config_cleanup(drm);
of_reserved_mem_device_release(dev); of_reserved_mem_device_release(dev);
drm_dev_put(drm); drm_dev_put(drm);
component_unbind_all(dev, NULL);
} }
static const struct component_master_ops sun4i_drv_master_ops = { static const struct component_master_ops sun4i_drv_master_ops = {
...@@ -407,6 +409,8 @@ static int sun4i_drv_probe(struct platform_device *pdev) ...@@ -407,6 +409,8 @@ static int sun4i_drv_probe(struct platform_device *pdev)
static int sun4i_drv_remove(struct platform_device *pdev) static int sun4i_drv_remove(struct platform_device *pdev)
{ {
component_master_del(&pdev->dev, &sun4i_drv_master_ops);
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册