From patchwork Mon Nov 27 21:26:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 13470343 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id ABFA1C4167B for ; Mon, 27 Nov 2023 21:26:54 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2825B10E2FC; Mon, 27 Nov 2023 21:26:54 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) by gabe.freedesktop.org (Postfix) with ESMTPS id BE2A310E2FC for ; Mon, 27 Nov 2023 21:26:51 +0000 (UTC) Received: from tr.lan (ip-86-49-120-218.bb.vodafone.cz [86.49.120.218]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 7436F877FA; Mon, 27 Nov 2023 22:26:49 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1701120410; bh=OU9QUeYmu7L9yF2F+KvzaO+xevqXeLCS8T7R91s64Cs=; h=From:To:Cc:Subject:Date:From; b=CAAYvRmzbb4h/g6FWZ7qwMUdFhMu1+K4udzTWU1GMJImMoY/giZyQMPuJFDOaevTJ HaeusWXBoiMJyeLsJOmXO6+qBxBWpElh+c8lSPpJynZStp/4w1X6/yKwCKtjn0OBoT Aa4J2tK2vl5Kuj5ytiQbfeQUaPTm6Or3/Ypfd0McXwCR7IDdRMkY1+ZWnnEu/Ekn7N 09vmpgggo2G0kIoZ/Feu7iv9spGKDQlw40b2sTrvl9+Mp0Gnj3/DsrDsbgGPpdjuKz 3EIUKqhq8ZDHwf2G9nNwNcxd8G39JBklbP0RvGJd/vDCHoQ6ivTVqm9lyZEgynUI1x ao0HpKrDRCCzg== From: Marek Vasut To: dri-devel@lists.freedesktop.org Subject: [PATCH] drm: lcdif: Switch to drmm_mode_config_init Date: Mon, 27 Nov 2023 22:26:25 +0100 Message-ID: <20231127212638.77688-1-marex@denx.de> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Marek Vasut , Pengutronix Kernel Team , Thomas Zimmermann , Sascha Hauer , Maxime Ripard , NXP Linux Team , Shawn Guo , linux-arm-kernel@lists.infradead.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Switch from deprecated unmanaged drm_mode_config_init() to managed drmm_mode_config_init(). No functional change. Signed-off-by: Marek Vasut Acked-by: Thomas Zimmermann --- Cc: Daniel Vetter Cc: David Airlie Cc: Fabio Estevam Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: NXP Linux Team Cc: Pengutronix Kernel Team Cc: Sascha Hauer Cc: Shawn Guo Cc: Stefan Agner Cc: Thomas Zimmermann Cc: dri-devel@lists.freedesktop.org Cc: linux-arm-kernel@lists.infradead.org --- drivers/gpu/drm/mxsfb/lcdif_drv.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/mxsfb/lcdif_drv.c b/drivers/gpu/drm/mxsfb/lcdif_drv.c index 18de2f17e2491..ea10bf81582e9 100644 --- a/drivers/gpu/drm/mxsfb/lcdif_drv.c +++ b/drivers/gpu/drm/mxsfb/lcdif_drv.c @@ -167,7 +167,11 @@ static int lcdif_load(struct drm_device *drm) return ret; /* 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"); + return ret; + } ret = lcdif_kms_init(lcdif); if (ret < 0) { @@ -227,7 +231,6 @@ static void lcdif_unload(struct drm_device *drm) drm_crtc_vblank_off(&lcdif->crtc); drm_kms_helper_poll_fini(drm); - drm_mode_config_cleanup(drm); pm_runtime_put_sync(drm->dev); pm_runtime_disable(drm->dev);