Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp344682pxb; Wed, 8 Sep 2021 02:32:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx8Ptbyg3Y0IEuzPJznuaUICjOc5LA3yoR+g/DePwJ6pyH5PDZHBLnq4jLrEp2ZL0BWORN4 X-Received: by 2002:a17:906:2a0d:: with SMTP id j13mr2868230eje.545.1631093558193; Wed, 08 Sep 2021 02:32:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631093558; cv=none; d=google.com; s=arc-20160816; b=sVQQ3vtqBX/tlydKUmYWWaxSNA4L9MnxQ1K9mGJWtcy6DCnmJvMXzoNWd2R4Vko8f0 2qia5ky1chUfh0msVwc0Em8zVdKdn2TiC0Ptb0w+Dm1rC66VzDSAqUEsGqlFaeBkljpM tmbL89XaeBbhpsQ8xiEBFVG7qqrGaJukN9CFEuBbrQszJgW3Oy+Sw/Zxn8MUk4nlnnQ5 hjQDKTZCXvqrVInF3LP4I6spKVu8RFTLEuoBCb0M7edqRAZ8HnCKRfUfTlsqTbfVUDZn 7I1fT9EIJQn2HSURBuRyXwO2EbJLjDB2nLpDb2hfDEg711SV/HHp/h3qww4P8KQdZpdj 6VvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=1lnmi8ly9B64261XocuiIXELp1JzEoKKIQYvRlV54ms=; b=Q0m6gNkKlh9IksrkcApYPSXFdg9QJtKz1X3OcEt3NO2eB0k4W+7nzgOxVfZhN2XZDn 5Gh5T7fsgHYL2yUnfzB4M6c6ZkWat25aq46VjYShsTAvyzImdkfRb61IrHKv/G6QtwfT 7UX1M0pKS1G/C956xMjcqgE+20E2W9wdeEuDCs92a6nArVVD3YKMddPoQLKqNHZcyVZ4 2FxpM6O+pmToYFv/0vRHQwIwFHCPSkBITapLuOORu66MJt02SumIxDw6+CTNHK0dbU2g hNE90U6jW1feX6cN+gkHIwp4N7ipexRKt26cjWl2p32dXv5jLhKwOOqYuAuuUhOkQV88 h1Jg== 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 h5si1599984ede.570.2021.09.08.02.32.13; Wed, 08 Sep 2021 02:32:38 -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 S1349451AbhIHHSb (ORCPT + 99 others); Wed, 8 Sep 2021 03:18:31 -0400 Received: from mx21.baidu.com ([220.181.3.85]:36294 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1349259AbhIHHSa (ORCPT ); Wed, 8 Sep 2021 03:18:30 -0400 Received: from BJHW-Mail-Ex15.internal.baidu.com (unknown [10.127.64.38]) by Forcepoint Email with ESMTPS id 454A2FD7F629CE20DA80; Wed, 8 Sep 2021 15:17:22 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BJHW-Mail-Ex15.internal.baidu.com (10.127.64.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14; Wed, 8 Sep 2021 15:17:22 +0800 Received: from LAPTOP-UKSR4ENP.internal.baidu.com (172.31.63.8) by BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14; Wed, 8 Sep 2021 15:17:21 +0800 From: Cai Huoqing To: CC: Maxime Ripard , Chen-Yu Tsai , "Jernej Skrabec" , , , Subject: [PATCH] soc: sunxi_sram: Make use of the helper function devm_platform_ioremap_resource() Date: Wed, 8 Sep 2021 15:17:15 +0800 Message-ID: <20210908071716.772-1-caihuoqing@baidu.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.31.63.8] X-ClientProxiedBy: BJHW-Mail-Ex11.internal.baidu.com (10.127.64.34) To BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) X-Baidu-BdMsfe-DateCheck: 1_BJHW-Mail-Ex15_2021-09-08 15:17:22:229 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use the devm_platform_ioremap_resource() helper instead of calling platform_get_resource() and devm_ioremap_resource() separately Signed-off-by: Cai Huoqing --- drivers/soc/sunxi/sunxi_sram.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/soc/sunxi/sunxi_sram.c b/drivers/soc/sunxi/sunxi_sram.c index 42833e33a96c..a8f3876963a0 100644 --- a/drivers/soc/sunxi/sunxi_sram.c +++ b/drivers/soc/sunxi/sunxi_sram.c @@ -331,7 +331,6 @@ static struct regmap_config sunxi_sram_emac_clock_regmap = { static int sunxi_sram_probe(struct platform_device *pdev) { - struct resource *res; struct dentry *d; struct regmap *emac_clock; const struct sunxi_sramc_variant *variant; @@ -342,8 +341,7 @@ static int sunxi_sram_probe(struct platform_device *pdev) if (!variant) return -EINVAL; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - base = devm_ioremap_resource(&pdev->dev, res); + base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(base)) return PTR_ERR(base); -- 2.25.1