Skip to content

Commit a67d508

Browse files
committed
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: Philipp Zabel <p.zabel@pengutronix.de> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
1 parent 67149a4 commit a67d508

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

drivers/gpu/drm/imx/imx-drm-core.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include <drm/drm_fb_helper.h>
2121
#include <drm/drm_gem_cma_helper.h>
2222
#include <drm/drm_gem_framebuffer_helper.h>
23+
#include <drm/drm_managed.h>
2324
#include <drm/drm_of.h>
2425
#include <drm/drm_plane_helper.h>
2526
#include <drm/drm_probe_helper.h>
@@ -212,7 +213,9 @@ static int imx_drm_bind(struct device *dev)
212213
drm->mode_config.allow_fb_modifiers = true;
213214
drm->mode_config.normalize_zpos = true;
214215

215-
drm_mode_config_init(drm);
216+
ret = drmm_mode_config_init(drm);
217+
if (ret)
218+
return ret;
216219

217220
ret = drm_vblank_init(drm, MAX_CRTC);
218221
if (ret)
@@ -251,7 +254,6 @@ static int imx_drm_bind(struct device *dev)
251254
drm_kms_helper_poll_fini(drm);
252255
component_unbind_all(drm->dev, drm);
253256
err_kms:
254-
drm_mode_config_cleanup(drm);
255257
drm_dev_put(drm);
256258

257259
return ret;
@@ -267,11 +269,9 @@ static void imx_drm_unbind(struct device *dev)
267269

268270
component_unbind_all(drm->dev, drm);
269271

270-
drm_mode_config_cleanup(drm);
272+
drm_dev_put(drm);
271273

272274
dev_set_drvdata(dev, NULL);
273-
274-
drm_dev_put(drm);
275275
}
276276

277277
static const struct component_master_ops imx_drm_ops = {

0 commit comments

Comments
 (0)