Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp285854pxb; Wed, 8 Sep 2021 00:50:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxIUAu8u5Dd5AJR340VhaN1edZUcfajvpTRYk06fA+Eoap2fP4dvOPUK/mvrcSFHuNbaaZp X-Received: by 2002:a92:4406:: with SMTP id r6mr1857721ila.88.1631087405216; Wed, 08 Sep 2021 00:50:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631087405; cv=none; d=google.com; s=arc-20160816; b=05HhZN1cho7ONg4MAgZz5KfJo21LcvsOtflQSCmqwyHPCwmvyorXw4sxt5tYqt8v1z RyjeH8EraY/CTJ4LWJFn3BdK13tLX7Tlm7LhXX2i8SACUrVkZRct/haTTX3PFPqsc+Tb HP0JNQmmX1yQTnd+bKro1RahZ7D0IGInDWlPCIg+8CrkEQK5Z9VEeKfOLgDk5gqNwffA yAC2YVY6PbTKsIQupj2ga5lsR0W/EcQ8IxJsLqDKqx8hYHhRkOzyinorCqTJwOi2fRFk 5KWmdm9g2mBHkThEvVeQhQdDBtMt5cbwOozqGMGsIVHFALNAfQpocHyLhMgXFiJusrq5 ruaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=1lnmi8ly9B64261XocuiIXELp1JzEoKKIQYvRlV54ms=; b=LEBiXxf7mHfCPY23LJ45aJ7tGBsqS9FuWniKGZnUod8H98rewqhN4sJmqpPAIaVRqH erkJ2Q+rgfi+IIQs/6DMauKUJgBiz8I9pu0P175/Y/rgmyVz1ngCKeEX/0g0Wf7CWj1J xTYt8u4zlJnUSQPdnsI4bWgPfREqoL34Hi59F/jUUB0vowK1cNP9myyQhYlSA/91EUIX bMHoydS/8yuk3nja9cGTPwqqeug+n79heH3gIeSijbL5qDZdye4SvMXgz0b37N5kpnc3 haXLnifsA6Qs2596kZpl7c7MerC0dGJ7FzwCAq/sIrYYD0P6Yf02xbIYpGXQHqMabSuA Kaug== 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 126si1218481jaw.85.2021.09.08.00.49.54; Wed, 08 Sep 2021 00:50:05 -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 S1348972AbhIHHND (ORCPT + 99 others); Wed, 8 Sep 2021 03:13:03 -0400 Received: from mx21.baidu.com ([220.181.3.85]:58284 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1348733AbhIHHNA (ORCPT ); Wed, 8 Sep 2021 03:13:00 -0400 Received: from BC-Mail-Ex27.internal.baidu.com (unknown [172.31.51.21]) by Forcepoint Email with ESMTPS id 6A44F5619AF682181CA5; Wed, 8 Sep 2021 15:11:48 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BC-Mail-Ex27.internal.baidu.com (172.31.51.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Wed, 8 Sep 2021 15:11:48 +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:11:47 +0800 From: Cai Huoqing To: CC: Neil Armstrong , Kevin Hilman , Jerome Brunet , "Martin Blumenstingl" , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , Florian Fainelli , , Li Yang , Krzysztof Halasa , Matthias Brugger , Maxime Ripard , Chen-Yu Tsai , Jernej Skrabec , Thierry Reding , Jonathan Hunter , "Santosh Shilimkar" , Nishanth Menon , , , , , , , , , Subject: [PATCH] soc: sunxi_sram: Make use of the helper function devm_platform_ioremap_resource() Date: Wed, 8 Sep 2021 15:11:16 +0800 Message-ID: <20210908071123.348-6-caihuoqing@baidu.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210908071123.348-1-caihuoqing@baidu.com> References: <20210908071123.348-1-caihuoqing@baidu.com> 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) 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