Commit a67d5088 authored by Philipp Zabel's avatar Philipp Zabel

drm/imx: drop explicit drm_mode_config_cleanup

Use drmm_mode_config_init() and drop the explicit calls to
drm_mode_config_cleanup().
Signed-off-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
Acked-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 67149a41
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include <drm/drm_fb_helper.h> #include <drm/drm_fb_helper.h>
#include <drm/drm_gem_cma_helper.h> #include <drm/drm_gem_cma_helper.h>
#include <drm/drm_gem_framebuffer_helper.h> #include <drm/drm_gem_framebuffer_helper.h>
#include <drm/drm_managed.h>
#include <drm/drm_of.h> #include <drm/drm_of.h>
#include <drm/drm_plane_helper.h> #include <drm/drm_plane_helper.h>
#include <drm/drm_probe_helper.h> #include <drm/drm_probe_helper.h>
...@@ -212,7 +213,9 @@ static int imx_drm_bind(struct device *dev) ...@@ -212,7 +213,9 @@ static int imx_drm_bind(struct device *dev)
drm->mode_config.allow_fb_modifiers = true; drm->mode_config.allow_fb_modifiers = true;
drm->mode_config.normalize_zpos = true; drm->mode_config.normalize_zpos = true;
drm_mode_config_init(drm); ret = drmm_mode_config_init(drm);
if (ret)
return ret;
ret = drm_vblank_init(drm, MAX_CRTC); ret = drm_vblank_init(drm, MAX_CRTC);
if (ret) if (ret)
...@@ -251,7 +254,6 @@ static int imx_drm_bind(struct device *dev) ...@@ -251,7 +254,6 @@ static int imx_drm_bind(struct device *dev)
drm_kms_helper_poll_fini(drm); drm_kms_helper_poll_fini(drm);
component_unbind_all(drm->dev, drm); component_unbind_all(drm->dev, drm);
err_kms: err_kms:
drm_mode_config_cleanup(drm);
drm_dev_put(drm); drm_dev_put(drm);
return ret; return ret;
...@@ -267,11 +269,9 @@ static void imx_drm_unbind(struct device *dev) ...@@ -267,11 +269,9 @@ static void imx_drm_unbind(struct device *dev)
component_unbind_all(drm->dev, drm); component_unbind_all(drm->dev, drm);
drm_mode_config_cleanup(drm); drm_dev_put(drm);
dev_set_drvdata(dev, NULL); dev_set_drvdata(dev, NULL);
drm_dev_put(drm);
} }
static const struct component_master_ops imx_drm_ops = { static const struct component_master_ops imx_drm_ops = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment