[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191223185918.9877-7-tiny.windzz@gmail.com>
Date: Mon, 23 Dec 2019 18:59:18 +0000
From: Yangtao Li <tiny.windzz@...il.com>
To: m.szyprowski@...sung.com, joro@...tes.org, kgene@...nel.org,
krzk@...nel.org, matthias.bgg@...il.com, agross@...nel.org,
bjorn.andersson@...aro.org, robdclark@...il.com, heiko@...ech.de,
mst@...hat.com, jasowang@...hat.com,
iommu@...ts.linux-foundation.org,
linux-arm-kernel@...ts.infradead.org,
linux-samsung-soc@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-mediatek@...ts.infradead.org, linux-arm-msm@...r.kernel.org,
linux-rockchip@...ts.infradead.org,
virtualization@...ts.linux-foundation.org
Cc: Yangtao Li <tiny.windzz@...il.com>
Subject: [PATCH 6/6] iommu/rockchip: convert to devm_platform_ioremap_resource
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <tiny.windzz@...il.com>
---
drivers/iommu/rockchip-iommu.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/iommu/rockchip-iommu.c b/drivers/iommu/rockchip-iommu.c
index b33cdd5aad81..c6d50396f4c2 100644
--- a/drivers/iommu/rockchip-iommu.c
+++ b/drivers/iommu/rockchip-iommu.c
@@ -1138,7 +1138,6 @@ static int rk_iommu_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
struct rk_iommu *iommu;
- struct resource *res;
int num_res = pdev->num_resources;
int err, i;
@@ -1156,10 +1155,7 @@ static int rk_iommu_probe(struct platform_device *pdev)
return -ENOMEM;
for (i = 0; i < num_res; i++) {
- res = platform_get_resource(pdev, IORESOURCE_MEM, i);
- if (!res)
- continue;
- iommu->bases[i] = devm_ioremap_resource(&pdev->dev, res);
+ iommu->bases[i] = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(iommu->bases[i]))
continue;
iommu->num_mmu++;
--
2.17.1
Powered by blists - more mailing lists