[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191223185918.9877-6-tiny.windzz@gmail.com>
Date: Mon, 23 Dec 2019 18:59:17 +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 5/6] iommu/mediatek: 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/mtk_iommu_v1.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/iommu/mtk_iommu_v1.c b/drivers/iommu/mtk_iommu_v1.c
index e93b94ecac45..3d6bb08b2a54 100644
--- a/drivers/iommu/mtk_iommu_v1.c
+++ b/drivers/iommu/mtk_iommu_v1.c
@@ -553,7 +553,6 @@ static int mtk_iommu_probe(struct platform_device *pdev)
{
struct mtk_iommu_data *data;
struct device *dev = &pdev->dev;
- struct resource *res;
struct component_match *match = NULL;
struct of_phandle_args larb_spec;
struct of_phandle_iterator it;
@@ -573,8 +572,7 @@ static int mtk_iommu_probe(struct platform_device *pdev)
return -ENOMEM;
data->protect_base = ALIGN(virt_to_phys(protect), MTK_PROTECT_PA_ALIGN);
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- data->base = devm_ioremap_resource(dev, res);
+ data->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(data->base))
return PTR_ERR(data->base);
--
2.17.1
Powered by blists - more mailing lists