[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20210908071059.291-2-caihuoqing@baidu.com>
Date: Wed, 8 Sep 2021 15:10:58 +0800
From: Cai Huoqing <caihuoqing@...du.com>
To: <caihuoqing@...du.com>
CC: Matthias Brugger <matthias.bgg@...il.com>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-mediatek@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>
Subject: [PATCH 3/3] soc: mtk-scpsys: Make use of the helper function devm_platform_ioremap_resource()
Use the devm_platform_ioremap_resource() helper instead of
calling platform_get_resource() and devm_ioremap_resource()
separately
Signed-off-by: Cai Huoqing <caihuoqing@...du.com>
---
drivers/soc/mediatek/mtk-scpsys.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/soc/mediatek/mtk-scpsys.c b/drivers/soc/mediatek/mtk-scpsys.c
index ca75b14931ec..2bed34b2b1c7 100644
--- a/drivers/soc/mediatek/mtk-scpsys.c
+++ b/drivers/soc/mediatek/mtk-scpsys.c
@@ -425,7 +425,6 @@ static struct scp *init_scp(struct platform_device *pdev,
bool bus_prot_reg_update)
{
struct genpd_onecell_data *pd_data;
- struct resource *res;
int i, j;
struct scp *scp;
struct clk *clk[CLK_MAX];
@@ -441,8 +440,7 @@ static struct scp *init_scp(struct platform_device *pdev,
scp->dev = &pdev->dev;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- scp->base = devm_ioremap_resource(&pdev->dev, res);
+ scp->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(scp->base))
return ERR_CAST(scp->base);
--
2.25.1
Powered by blists - more mailing lists