Switch from deprecated unmanaged drm_mode_config_init() to managed drmm_mode_config_init(). No functional change.
Signed-off-by: Marek Vasut <[email protected]> --- Cc: Daniel Vetter <[email protected]> Cc: David Airlie <[email protected]> Cc: Fabio Estevam <[email protected]> Cc: Maarten Lankhorst <[email protected]> Cc: Maxime Ripard <[email protected]> Cc: NXP Linux Team <[email protected]> Cc: Pengutronix Kernel Team <[email protected]> Cc: Sascha Hauer <[email protected]> Cc: Shawn Guo <[email protected]> Cc: Stefan Agner <[email protected]> Cc: Thomas Zimmermann <[email protected]> Cc: [email protected] Cc: [email protected] --- V2: Drop matching drm_mode_config_cleanup --- drivers/gpu/drm/mxsfb/mxsfb_drv.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/mxsfb/mxsfb_drv.c b/drivers/gpu/drm/mxsfb/mxsfb_drv.c index 3bfa369b2507e..cfa3176ebe2c2 100644 --- a/drivers/gpu/drm/mxsfb/mxsfb_drv.c +++ b/drivers/gpu/drm/mxsfb/mxsfb_drv.c @@ -248,7 +248,11 @@ static int mxsfb_load(struct drm_device *drm, pm_runtime_enable(drm->dev); /* Modeset init */ - drm_mode_config_init(drm); + ret = drmm_mode_config_init(drm); + if (ret) { + dev_err(drm->dev, "Failed to initialize mode config\n"); + goto err_vblank; + } ret = mxsfb_kms_init(mxsfb); if (ret < 0) { @@ -311,7 +315,6 @@ static int mxsfb_load(struct drm_device *drm, static void mxsfb_unload(struct drm_device *drm) { drm_kms_helper_poll_fini(drm); - drm_mode_config_cleanup(drm); pm_runtime_get_sync(drm->dev); mxsfb_irq_uninstall(drm); -- 2.42.0
