From patchwork Wed Apr 12 11:52:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 13209055 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 1A8AFC7619A for ; Wed, 12 Apr 2023 11:53:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=H9kTsUviP2YznfyjUCZPHJJtkgbzFOSzH/4VGK0tT4I=; b=RVXtNRaAuinUyq ZEd/TA1clw6ZPsQMItyVoL7UywfJCAt74bhxCBJI57aTbY9t7xHpSRFeWQKu6tS96al8tdltqmZP1 7PPmaXapi58n3owm9LSpkkKkpg3exanjm9Z2X6n3ALAugYUUzKYb7FY69y7iUydY4dsvwd/YLVgvU +C2buJ0nJCLm/r58J7lOQRZ5J8Y3CXezb44a1UzB+zsNjBNief72JExFygfAxDRu6KZbJMFBGPEUP SVBS8og6CNzjk6FAUjvC8GY/I01rypoiPlQCbOSlrKVv+UGoqTRTxNLTms1r1oWoy+S5rFUN42c7x yWgjAH860Fv585Cibr2A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pmZ27-002xMZ-2y; Wed, 12 Apr 2023 11:53:03 +0000 Received: from madras.collabora.co.uk ([46.235.227.172]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pmZ21-002xHE-0n; Wed, 12 Apr 2023 11:52:58 +0000 Received: from IcarusMOD.eternityproject.eu (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id 2798F6603206; Wed, 12 Apr 2023 12:52:55 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1681300375; bh=ozztGkuiked8t0x6McsZxjJnWL+Yy3Frm2zFzFN/2I0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hmYdnNEG2hFuDTRej2VrjOqKCojBa6mVNVGe6d/pRF3JHNjFAmZb12BVxP84zMyUz 0yD2cKh8+zOzI7DrE7hAK8b2jIP5aG2h4w83L09SN7rEDbPoSEZ1IPRt5dZB32vg+t wdp+9CB9E8QfPLqyJhDH8wONxfntzCYZh/FRGVuzJAl/MQsjBvPdIXPXYbpQ+dxXWw SC6ewx5a/qMTwKgo/llMMjUixcmVJvHnHNFbL74WijT0gvlijTlB6b71hb/sJPTcdP 7xx1lf2pqkJqZy8Uvk9Y2xZW890ww/46ZNVuJd4Xoy3O4WF/BYZqI98cTx9wSsUYro Zu5rgUXIv2k+Q== From: AngeloGioacchino Del Regno To: chunkuang.hu@kernel.org Cc: p.zabel@pengutronix.de, airlied@gmail.com, daniel@ffwll.ch, matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com, dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@collabora.com Subject: [PATCH 1/4] drm/mediatek: mtk_dpi: Simplify with devm_drm_bridge_add() Date: Wed, 12 Apr 2023 13:52:47 +0200 Message-Id: <20230412115250.164899-2-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230412115250.164899-1-angelogioacchino.delregno@collabora.com> References: <20230412115250.164899-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230412_045257_411436_D1CFDFE8 X-CRM114-Status: GOOD ( 10.72 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Change drm_bridge_add() to its devm variant to slightly simplify the probe function. Signed-off-by: AngeloGioacchino Del Regno --- drivers/gpu/drm/mediatek/mtk_dpi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c index 948a53f1f4b3..2d5f3fc34f61 100644 --- a/drivers/gpu/drm/mediatek/mtk_dpi.c +++ b/drivers/gpu/drm/mediatek/mtk_dpi.c @@ -1090,11 +1090,12 @@ static int mtk_dpi_probe(struct platform_device *pdev) dpi->bridge.of_node = dev->of_node; dpi->bridge.type = DRM_MODE_CONNECTOR_DPI; - drm_bridge_add(&dpi->bridge); + ret = devm_drm_bridge_add(dev, &dpi->bridge); + if (ret) + return ret; ret = component_add(dev, &mtk_dpi_component_ops); if (ret) { - drm_bridge_remove(&dpi->bridge); dev_err(dev, "Failed to add component: %d\n", ret); return ret; } From patchwork Wed Apr 12 11:52:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 13209058 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 9038AC7619A for ; Wed, 12 Apr 2023 11:53:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=i4Ge1Jw3TRd6wimjzBD40buKTPi1eUxTnryRVYflPOQ=; b=YdEfqU9o4LjkHH d4KbzewKmwHjfmjpLlcxmuXORDt9WTCC7d23ytgYqpd8M07DwPraRX6UAmyCMe/ICP+FAYk14PQF2 roA5RvyNOYfslJZuiAPJ8WrrnSI1y2AtLkgPoeZRrkX17FJ10uynsE54eVjsCF3j3Awar+no/oUtg nwvO3NCAnoXWiEt+2kXZunMcLMXJDfKnNfLqSVFseg67rIabC+J8RFtd7Wn4lK2pjmAtTXGER+hMS 7nZwE0m3x84bB1nTwhN52NR/KX7D6lEsoGqzTikWW19K/tMKyhT8e0C1b/xu2fNstKKANpQF7weRq i74phMO6J39zxZx7rbFQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pmZ29-002xOE-2M; Wed, 12 Apr 2023 11:53:05 +0000 Received: from madras.collabora.co.uk ([46.235.227.172]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pmZ21-002xHe-2P; Wed, 12 Apr 2023 11:52:59 +0000 Received: from IcarusMOD.eternityproject.eu (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id EDFE3660320C; Wed, 12 Apr 2023 12:52:55 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1681300376; bh=NPIAVgMhynQ80l9U9V5P644tA7N53bJbVDqHK/OjMuo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lkfgRVO3zlxW/ULul1JEIzxHKMnfjPRKgrhNMxBI62JzfTWMberyyWWM0NbFzZjC7 aVJDkpE18di0qOfzKt/nljSpmHQoc50BkXEytQs9I1S5GmG1ofDp76c3ZUmipR42ek FxqIIYF6r+u2ppCypZBhGdWvZ/SRaCTKoHdoFew6W50f7VSKBfIUGVFahvykYC6z2a 1t66hgV5g7RKIPICFV9AhKEey7BIviJG0nPHw3bXbBKCou0aAlrzPlF9xOgimxD0Qd fU/HOusxroeZ+LS5XXvQmw5FeX8ZRGFLpN0lzcPOuWsbuk8qDv76DwfeyXwVx0bsR/ yaByGHIFz0ZXw== From: AngeloGioacchino Del Regno To: chunkuang.hu@kernel.org Cc: p.zabel@pengutronix.de, airlied@gmail.com, daniel@ffwll.ch, matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com, dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@collabora.com Subject: [PATCH 2/4] drm/mediatek: mtk_dpi: Simplify with dev_err_probe() Date: Wed, 12 Apr 2023 13:52:48 +0200 Message-Id: <20230412115250.164899-3-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230412115250.164899-1-angelogioacchino.delregno@collabora.com> References: <20230412115250.164899-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230412_045257_920755_48D07B03 X-CRM114-Status: GOOD ( 10.80 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Use dev_err_probe() across the entire probe function of this driver to shrink the size. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Fei Shao --- drivers/gpu/drm/mediatek/mtk_dpi.c | 44 ++++++++++-------------------- 1 file changed, 14 insertions(+), 30 deletions(-) diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c index 2d5f3fc34f61..6be65ea21f8f 100644 --- a/drivers/gpu/drm/mediatek/mtk_dpi.c +++ b/drivers/gpu/drm/mediatek/mtk_dpi.c @@ -1040,38 +1040,24 @@ static int mtk_dpi_probe(struct platform_device *pdev) } mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); dpi->regs = devm_ioremap_resource(dev, mem); - if (IS_ERR(dpi->regs)) { - ret = PTR_ERR(dpi->regs); - dev_err(dev, "Failed to ioremap mem resource: %d\n", ret); - return ret; - } + if (IS_ERR(dpi->regs)) + return dev_err_probe(dev, PTR_ERR(dpi->regs), + "Failed to ioremap mem resource\n"); dpi->engine_clk = devm_clk_get(dev, "engine"); - if (IS_ERR(dpi->engine_clk)) { - ret = PTR_ERR(dpi->engine_clk); - if (ret != -EPROBE_DEFER) - dev_err(dev, "Failed to get engine clock: %d\n", ret); - - return ret; - } + if (IS_ERR(dpi->engine_clk)) + return dev_err_probe(dev, PTR_ERR(dpi->engine_clk), + "Failed to get engine clock\n"); dpi->pixel_clk = devm_clk_get(dev, "pixel"); - if (IS_ERR(dpi->pixel_clk)) { - ret = PTR_ERR(dpi->pixel_clk); - if (ret != -EPROBE_DEFER) - dev_err(dev, "Failed to get pixel clock: %d\n", ret); - - return ret; - } + if (IS_ERR(dpi->pixel_clk)) + return dev_err_probe(dev, PTR_ERR(dpi->pixel_clk), + "Failed to get pixel clock\n"); dpi->tvd_clk = devm_clk_get(dev, "pll"); - if (IS_ERR(dpi->tvd_clk)) { - ret = PTR_ERR(dpi->tvd_clk); - if (ret != -EPROBE_DEFER) - dev_err(dev, "Failed to get tvdpll clock: %d\n", ret); - - return ret; - } + if (IS_ERR(dpi->tvd_clk)) + return dev_err_probe(dev, PTR_ERR(dpi->tvd_clk), + "Failed to get tvdpll clock\n"); dpi->irq = platform_get_irq(pdev, 0); if (dpi->irq <= 0) @@ -1095,10 +1081,8 @@ static int mtk_dpi_probe(struct platform_device *pdev) return ret; ret = component_add(dev, &mtk_dpi_component_ops); - if (ret) { - dev_err(dev, "Failed to add component: %d\n", ret); - return ret; - } + if (ret) + return dev_err_probe(dev, ret, "Failed to add component.\n"); return 0; } From patchwork Wed Apr 12 11:52:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 13209057 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 D1787C77B6E for ; Wed, 12 Apr 2023 11:53:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=noo75/+N1Ih5dZA4Vu5oz/BBqma1KvEYQvmhgoqmDBA=; b=VQItJTIH1iwz7z 9cWzOV2t4yerMmLhNpAcnFYGt3NQ7p1TB7UzIpL9osrsHwnS/Fd7vfSGTIsEebJsnD3Sa418psviq Ve02vjFmelkhp1LPN02u07rqOWdYCvK/KtoN2lU9FKBx851tHOFNDOgLhM26qA7Ee0qGjLvMkHoFi nny2rg/imbzD9/VnU4E11KOmPVjkakKdrYjeRWnECzsWYvNAS3hrjRckQWZHIAYVXtltjj6oawmIC ++W/vFBsQX9GXN1tys/MfdaMnsXFCt4wwJBhYtgqmToqZkjBX6IO49uTFuYO6IaNO/MIwGeO2WgM9 XK5mtvHAqYFjmQX0A8LQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pmZ2B-002xPS-1S; Wed, 12 Apr 2023 11:53:07 +0000 Received: from madras.collabora.co.uk ([46.235.227.172]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pmZ22-002xI3-1q; Wed, 12 Apr 2023 11:53:00 +0000 Received: from IcarusMOD.eternityproject.eu (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id C01186603239; Wed, 12 Apr 2023 12:52:56 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1681300377; bh=4FBue3qHRI25FXn0MBkODyzRRRK4GfsWagmvjRhDO5g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eCDzv+FOppqjQwIZrSpLGamwEACPh8hraG9vIjR0E0AgYoBxv+sPdCf2/Luumn17G qhi0/SDnLZ8wgejRJhNmWA/61b3g3TWrK2Gjh3OzYuQHWCv1ct7H4xSOkYRVJoLEV9 hjBzIAhAXCLMxutGeXBMLU/pUQRXWYhe3aN4oI3QXqR9ei3BsRXd8AhOYtQ+kgQa6M Te6guvGzaM3roCpgBvuqeE+cDk84GztJ07AfRfVrmLHdX2764kUJJEyKkjaft311KB fFuBafK5G7ZYGZwHgUiRYt1da5+UwiqbfzeOTm1GNY3fMjCOG6YfFJcrCiXsG5G9rQ yVRV+Rem0Elkw== From: AngeloGioacchino Del Regno To: chunkuang.hu@kernel.org Cc: p.zabel@pengutronix.de, airlied@gmail.com, daniel@ffwll.ch, matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com, dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@collabora.com Subject: [PATCH 3/4] drm/mediatek: mtk_dpi: Switch to devm_drm_of_get_bridge() Date: Wed, 12 Apr 2023 13:52:49 +0200 Message-Id: <20230412115250.164899-4-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230412115250.164899-1-angelogioacchino.delregno@collabora.com> References: <20230412115250.164899-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230412_045258_773170_32630B1C X-CRM114-Status: GOOD ( 11.45 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Function drm_of_find_panel_or_bridge() is marked as deprecated: since the usage of that in this driver exactly corresponds to the new function devm_drm_of_get_bridge(), switch to it. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Fei Shao --- drivers/gpu/drm/mediatek/mtk_dpi.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c index 6be65ea21f8f..9025111013d3 100644 --- a/drivers/gpu/drm/mediatek/mtk_dpi.c +++ b/drivers/gpu/drm/mediatek/mtk_dpi.c @@ -1063,10 +1063,9 @@ static int mtk_dpi_probe(struct platform_device *pdev) if (dpi->irq <= 0) return -EINVAL; - ret = drm_of_find_panel_or_bridge(dev->of_node, 0, 0, - NULL, &dpi->next_bridge); - if (ret) - return ret; + dpi->next_bridge = devm_drm_of_get_bridge(dev, dev->of_node, 0, 0); + if (IS_ERR(dpi->next_bridge)) + return PTR_ERR(dpi->next_bridge); dev_info(dev, "Found bridge node: %pOF\n", dpi->next_bridge->of_node); From patchwork Wed Apr 12 11:52:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 13209059 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 64B1CC77B71 for ; Wed, 12 Apr 2023 11:53:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=l0vhU+AQry8fS0Nid4WohSVsCcqrl+aHDCTjhG6gQq0=; b=dm7k1A3ClGTWKM Uba6yI6RCvq1k0DdkmQNZVs/QL45JLe/Ba3NKQcx2cnBJexWtGFgaIKaY3QmnIxD6JpagD3zasiUe 43e9tV3HoyklDQBAaKYzWq5h+DwZ8hP4vsYlgc73OokNl9HlRQzYgYCltkl2hAoZpLRkr6sIC0bD2 XvbiqvNMyMoEOtf9iI0U1x0o6sm5UmNAzwjDpFjOc+YZaEGtdTEEfA/gS32P5PlqaFXdqZb6eqMuu sN0LdZ/dKTgm/pfZUUyYuUWfJizulQEcbsL8MDwN8tYHuJGbECxHJBq+K2nJ4I4vOyzM8isKem4LI MHZ9bMtGIQNKctpRl6uA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pmZ2G-002xVT-2a; Wed, 12 Apr 2023 11:53:12 +0000 Received: from madras.collabora.co.uk ([46.235.227.172]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pmZ23-002xIs-14; Wed, 12 Apr 2023 11:53:00 +0000 Received: from IcarusMOD.eternityproject.eu (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id 8C3746603255; Wed, 12 Apr 2023 12:52:57 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1681300378; bh=vgCzOfsjHqzxe3JGHPEHxks0hGKSfmPemepHaQkMDtA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NpXmWnzd7n6i6f8IL8PsTjmmrcY+PxcIlozvsyLlO/nXiUoAiHOT7hrz5UxEIXlTy BK7p1M7If7Z1qv+9SnxnR8kBT/4JPGKFkPxGUDPE4u5BWkJBNz700V3/VTE6bIaosU x8ybm+BOw1k5P5nJO8ycE+/7xpDYRBFTx+Dwb+CSSOv7H1znWtEZxz82ZJhWjG3v1S goFaCI6im7cJ/RR3/UiAIswySZFnRftqFEmxnqQl4edQYYk5e/lMwYJfNZLXfPHUmJ qNIPMD12PwyO2c331b8V1gr0SIwB7tTbrLopgwI8CuqzjpnuoIym6vKW429R7QcNLG 4TgxMu5iIuHMQ== From: AngeloGioacchino Del Regno To: chunkuang.hu@kernel.org Cc: p.zabel@pengutronix.de, airlied@gmail.com, daniel@ffwll.ch, matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com, dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@collabora.com Subject: [PATCH 4/4] drm/mediatek: mtk_dpi: Use devm_platform_get_and_ioremap_resource() Date: Wed, 12 Apr 2023 13:52:50 +0200 Message-Id: <20230412115250.164899-5-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230412115250.164899-1-angelogioacchino.delregno@collabora.com> References: <20230412115250.164899-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230412_045259_498106_E1BE2AF9 X-CRM114-Status: GOOD ( 10.53 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Instead of the open-coded platform_get_resource, devm_ioremap_resource switch to devm_platform_get_and_ioremap_resource(), doing exactly the same. Signed-off-by: AngeloGioacchino Del Regno --- drivers/gpu/drm/mediatek/mtk_dpi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c index 9025111013d3..45535dc7970f 100644 --- a/drivers/gpu/drm/mediatek/mtk_dpi.c +++ b/drivers/gpu/drm/mediatek/mtk_dpi.c @@ -1038,8 +1038,7 @@ static int mtk_dpi_probe(struct platform_device *pdev) dev_dbg(&pdev->dev, "Cannot find pinctrl active!\n"); } } - mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); - dpi->regs = devm_ioremap_resource(dev, mem); + dpi->regs = devm_platform_get_and_ioremap_resource(pdev, 0, &mem); if (IS_ERR(dpi->regs)) return dev_err_probe(dev, PTR_ERR(dpi->regs), "Failed to ioremap mem resource\n");