summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Kocialkowski <paul.kocialkowski@bootlin.com>2019-04-18 15:27:27 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-05-16 19:41:24 +0200
commit24b1c849ce9d660bf7ce286f3c13ebd79ec4b7eb (patch)
tree8e5f070f4b6059a68c5b76e528ca7ac50a520af2
parent1973df1ec5bca945359dfc1af0e0f7471fa0c509 (diff)
downloadlinux-stable-24b1c849ce9d660bf7ce286f3c13ebd79ec4b7eb.tar.gz
linux-stable-24b1c849ce9d660bf7ce286f3c13ebd79ec4b7eb.tar.bz2
linux-stable-24b1c849ce9d660bf7ce286f3c13ebd79ec4b7eb.zip
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: 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-4-paul.kocialkowski@bootlin.com Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--drivers/gpu/drm/sun4i/sun4i_drv.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/sun4i/sun4i_drv.c b/drivers/gpu/drm/sun4i/sun4i_drv.c
index 7cac01c72c02..62703630090a 100644
--- a/drivers/gpu/drm/sun4i/sun4i_drv.c
+++ b/drivers/gpu/drm/sun4i/sun4i_drv.c
@@ -160,6 +160,8 @@ static void sun4i_drv_unbind(struct device *dev)
drm_mode_config_cleanup(drm);
of_reserved_mem_device_release(dev);
drm_dev_put(drm);
+
+ component_unbind_all(dev, NULL);
}
static const struct component_master_ops sun4i_drv_master_ops = {
@@ -407,6 +409,8 @@ static int sun4i_drv_probe(struct platform_device *pdev)
static int sun4i_drv_remove(struct platform_device *pdev)
{
+ component_master_del(&pdev->dev, &sun4i_drv_master_ops);
+
return 0;
}