@@ -1175,7 +1175,6 @@ static int omap_iommu_probe(struct platform_device *pdev)
int err = -ENODEV;
int irq;
struct omap_iommu *obj;
- struct resource *res;
struct device_node *of = pdev->dev.of_node;
struct orphan_dev *orphan_dev, *tmp;
@@ -1218,8 +1217,7 @@ static int omap_iommu_probe(struct platform_device *pdev)
spin_lock_init(&obj->iommu_lock);
spin_lock_init(&obj->page_table_lock);
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- obj->regbase = devm_ioremap_resource(obj->dev, res);
+ obj->regbase = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(obj->regbase))
return PTR_ERR(obj->regbase);
Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li <tiny.windzz@gmail.com> --- drivers/iommu/omap-iommu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)