Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp403882pxb; Wed, 8 Sep 2021 04:02:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwVO1OyKgxgNJLxx5c8Ctr9XyOZ1AKUdXxSbVYhhgEFcxiv7TfzPoxnul6isiFslw2j16lY X-Received: by 2002:a6b:6a13:: with SMTP id x19mr2802471iog.111.1631098931243; Wed, 08 Sep 2021 04:02:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631098931; cv=none; d=google.com; s=arc-20160816; b=KOVBk4kvxS58PYsTYQ3qZdtlvPkFPO3+gFbG/ProI5HQhjmk/Tju6Gv/RnWdfqKB/d kyJD34PPC2+3hGxW799zTgabJAj6GZOXm+V7DjTg6XWo10a0zN1B7d9c1zbFjqeLuMQb HiFJFmbYtqaIHjdgoM1OtP7/ziOUvGCaPdUPg+aZ/wjc5nFWjL6Wh3xXdbMB50HOjrMc IAwEYscVVh8H53mOxFPfsH/W0Y+tmH2FewV/GkiwPU2S5aVpdf4OGHSb8nzbLX/M2+Ha D0+nc7jSviI3WTB1y6SlyEQrKwYru5CqwaUHTiec68cDRFje0qFvTg1rxIIlEsQY2iNS wUTw== 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=LH8dV/3jLwQ0+SKdUtkYQJS3D4zxqiMht96KZevNDOU=; b=ZknOc/IqVucksg8TovzKqWWYrDVfV/XtYR5iq0Trdawzl2LYykHClndbyfLWAQbinf Kb/BhO/OzvT1tpXMRwmB5ySHmRifLDHvm5vDzRdOuf3r513yErWHTVaGDVJuse0uxqHQ Cr8HGaR2vLIouBCIxyk1Ql33Gm+GNTessi2bQeSU6QGAVdYSE5sFamJVt+4Ve21BUCbK o7HsOn0wyN4ePIGgzGvZ45E5LkG//BtMb7IBLSV63+zeFp/X/G9w16ih0+/pJhTqgMn7 fi+Mf7qUTXhbS1iXSGlk2du8ybm9zBUanbks7fW+pyN0qZieHZUJha/63N2OOO8kWFao sxow== 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 t10si2328605iof.42.2021.09.08.04.01.33; Wed, 08 Sep 2021 04:02:11 -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 S1351422AbhIHK7U (ORCPT + 99 others); Wed, 8 Sep 2021 06:59:20 -0400 Received: from mx20.baidu.com ([111.202.115.85]:41702 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1351469AbhIHK7K (ORCPT ); Wed, 8 Sep 2021 06:59:10 -0400 Received: from BC-Mail-Ex16.internal.baidu.com (unknown [172.31.51.56]) by Forcepoint Email with ESMTPS id 3505F1B2EC755B1496F8; Wed, 8 Sep 2021 18:58:01 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BC-Mail-Ex16.internal.baidu.com (172.31.51.56) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2242.12; Wed, 8 Sep 2021 18:58:01 +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 18:57:58 +0800 From: Cai Huoqing To: CC: Robert Marko , Luka Perkov , Liam Girdwood , Mark Brown , , Subject: [PATCH] regulator: vqmmc-ipq4019: Make use of the helper function devm_platform_ioremap_resource() Date: Wed, 8 Sep 2021 18:57:51 +0800 Message-ID: <20210908105752.2035-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-Ex15.internal.baidu.com (10.127.64.38) 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/regulator/vqmmc-ipq4019-regulator.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/regulator/vqmmc-ipq4019-regulator.c b/drivers/regulator/vqmmc-ipq4019-regulator.c index 6d5ae25d08d1..c4213f096fe5 100644 --- a/drivers/regulator/vqmmc-ipq4019-regulator.c +++ b/drivers/regulator/vqmmc-ipq4019-regulator.c @@ -48,7 +48,6 @@ static int ipq4019_regulator_probe(struct platform_device *pdev) struct regulator_init_data *init_data; struct regulator_config cfg = {}; struct regulator_dev *rdev; - struct resource *res; struct regmap *rmap; void __iomem *base; @@ -57,8 +56,7 @@ static int ipq4019_regulator_probe(struct platform_device *pdev) if (!init_data) return -EINVAL; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - base = devm_ioremap_resource(dev, res); + base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(base)) return PTR_ERR(base); -- 2.25.1