diff options
author | Brian Starkey <brian.starkey@arm.com> | 2016-10-11 15:26:06 +0100 |
---|---|---|
committer | Liviu Dudau <Liviu.Dudau@arm.com> | 2016-11-04 17:09:00 +0000 |
commit | de9c4810abc6a2e38c93a31bddfa9c0a502f7212 (patch) | |
tree | d1bcb0b9c21f2166a8f8d225e837bac1b90b517d /drivers/gpu/drm/arm/malidp_drv.c | |
parent | a46a096a40c8533f94e781d376b798c1a5208cfd (diff) | |
download | linux-de9c4810abc6a2e38c93a31bddfa9c0a502f7212.tar.gz |
arm: mali-dp: Extract mode_config cleanup into malidp_fini
Split out malidp_fini as the opposite of malidp_init. This helps keep
the cleanup paths neat and easier to manage.
Signed-off-by: Brian Starkey <brian.starkey@arm.com>
Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com>
Diffstat (limited to 'drivers/gpu/drm/arm/malidp_drv.c')
-rw-r--r-- | drivers/gpu/drm/arm/malidp_drv.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/gpu/drm/arm/malidp_drv.c b/drivers/gpu/drm/arm/malidp_drv.c index 9468dfd52336..9bd6b072a405 100644 --- a/drivers/gpu/drm/arm/malidp_drv.c +++ b/drivers/gpu/drm/arm/malidp_drv.c @@ -156,6 +156,12 @@ static int malidp_init(struct drm_device *drm) return 0; } +static void malidp_fini(struct drm_device *drm) +{ + malidp_de_planes_destroy(drm); + drm_mode_config_cleanup(drm); +} + static int malidp_irq_init(struct platform_device *pdev) { int irq_de, irq_se, ret = 0; @@ -414,8 +420,7 @@ bind_fail: port_fail: drm_dev_unregister(drm); register_fail: - malidp_de_planes_destroy(drm); - drm_mode_config_cleanup(drm); + malidp_fini(drm); init_fail: drm->dev_private = NULL; dev_set_drvdata(dev, NULL); @@ -448,8 +453,7 @@ static void malidp_unbind(struct device *dev) of_node_put(malidp->crtc.port); malidp->crtc.port = NULL; drm_dev_unregister(drm); - malidp_de_planes_destroy(drm); - drm_mode_config_cleanup(drm); + malidp_fini(drm); drm->dev_private = NULL; dev_set_drvdata(dev, NULL); clk_disable_unprepare(hwdev->mclk); |