Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1025290pxk; Fri, 18 Sep 2020 01:36:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxULRCUcLCsUIFbtKoA5m+qlxlenTYYOuIRUhAGjWTV0EbgAVzcih1P6KekEz/CQbPyVCz9 X-Received: by 2002:a17:906:4755:: with SMTP id j21mr35513647ejs.228.1600418179752; Fri, 18 Sep 2020 01:36:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600418179; cv=none; d=google.com; s=arc-20160816; b=VLkbwMImTEp1BacWTTR/VG3g2OMDNgyklE+sU0AqD1Ep1Fnn4M5/SjC1Aut1t7Sslj oyj/zdwdSdzZA5RkzXMclzHupQW/XlOL8x1TcpWPDlIpQw9d1PRICSkgzdM9lzR29rEA efv3LVTxrVwPaa903+NS5mpsFjWzmo5f6G/g3WtgwqS0A9aAYINy7q0X3yjn2fYSkP4i VwPOhTrm8o5kEDjCruySthXlRBbgkEadhhBWUKpeBk9lh8RutbNXeKuR4AYnRmcVu5ay B6vEhzDv5gFSpoSOMQbXth/Pr/LJ6UoGZ7P5ki4fuLAohTYblHpMxG8ei+STLHHttO2I kX7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:mime-version:message-id:date:subject:cc:from; bh=/TD6nrQfjcR/8EFujnuyK/8CvK4o0m1a+w2DRZiVWvo=; b=f+WU7mb0chGCbDGignQU8D1NBK9nqr97Y6XzA0F122j46aQU3e8bNWtTHmORbqZUW8 JmRDeI1Im7+bb57f7iPpU0I0jxN+18XuwjMwjcoMUbycwTp4x5g98JC+IECFb+t1KcMx UOkk0l6EcBs0d8O4GsQ4ev5u+9luEEvHkQGzgwQUEJZA0BJQf3yBO1xFSADaxBplKESN pbage6MX1lepHcPa2ret9j2Gc1sXe8edSBs7id6uiHfV0KPVPQnC1+kvMm0rK8O/zX2H p+Tf4L84A5hdtQFL0NXkGAwbY5IcQhb0D/7b0Vf/eNDW67KPJzUOXhtNhk3fvz+1BNWa NH0w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c3si1545393edr.295.2020.09.18.01.35.56; Fri, 18 Sep 2020 01:36:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726249AbgIRIfB (ORCPT + 99 others); Fri, 18 Sep 2020 04:35:01 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:13295 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726109AbgIRIfB (ORCPT ); Fri, 18 Sep 2020 04:35:01 -0400 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id BC9EAA1EEE72563EFB9D; Fri, 18 Sep 2020 16:34:56 +0800 (CST) Received: from huawei.com (10.175.124.27) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.487.0; Fri, 18 Sep 2020 16:34:48 +0800 From: Wang ShaoBo CC: , , , , , Subject: [PATCH -next] iommu/rockchip: Use devm_platform_ioremap_resource() Date: Fri, 18 Sep 2020 16:34:15 +0800 Message-ID: <20200918083415.33024-1-bobo.shaobowang@huawei.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.124.27] X-CFilter-Loop: Reflected To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Make use of devm_platform_ioremap_resource() provided by driver core platform instead of duplicated analogue. Signed-off-by: Wang ShaoBo --- 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 e5d86b7177de..cc4b654be2cc 100644 --- a/drivers/iommu/rockchip-iommu.c +++ b/drivers/iommu/rockchip-iommu.c @@ -1126,7 +1126,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; @@ -1144,10 +1143,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, i); if (IS_ERR(iommu->bases[i])) continue; iommu->num_mmu++; -- 2.17.1