Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp269409pxb; Wed, 8 Sep 2021 00:19:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxKfOwqnWyv0yU5AvnTDZWETuRXUm1eSOyOBuwlWDnd7KBjkFWfbduS/loOWJkQ6swiRTvf X-Received: by 2002:a50:cd9d:: with SMTP id p29mr584806edi.30.1631085571630; Wed, 08 Sep 2021 00:19:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631085571; cv=none; d=google.com; s=arc-20160816; b=R32LjjBU2gmMVqtjZaxFT6zMuBc/lrikZaEan4+uqwG/iXp5TB8lN+I6UMr82x5Q39 E2AZGTZvVlJRJ9xZU2MaZbQLdflqHvMzlU0/tgrPdImqIN4WXOfVt8Vq/6Qf3V63+O7z qmMhQaNyiVuiAinVfgRL3otYBVWNzOFUcGXMp/6Exzv3gUo7x/oHGiP9hjF6m2cdyXVl CiwNwe4Wd1kgmAch5qzPy9gHEomFYLKWAJrMjx70rqRx1Wy23xMt1ZKXVHgZL13PlCm/ 4nxMWs0FM9bMGO3sZVzOt8ic50fHHru2LFGwb0gJglRs4rcb7NKJvaP9EH5Cg+KyZERO +eZQ== 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=JhnDVUPrzhL0FehnuQV7Qw+xekS4o6qztY2+qHtz9zk=; b=wCY7yYP7u2putRkOHVTcSgkDpPg2D9FsE585vyEkxZA4vUTqt42CLWJ4KiFSezCgXO 8riCT7RohhxOqnBYXjIo7biPZWpcLJ/nX84/BhMhJx2E0V7C/ZpCYlt8BrIxjHYSkCuj ItJBAXAxiTr05lGmNjRw5zxVySbEDue4Uz6bpbKicHAd4hYUq2UovF4G4aVm/rW9Y+gw iktqUQJxykz7+HHp1ucfoRVieFa6eWHhqD5dC+eQNS7XhAkJOADRSVZmujuDW7+4Ly6y EZSfCgy8hTIMDW38PbPvdn3l2981KKUw6UzPY3LZ7s6zK4RIDVLb9lreFHSmiClTH064 g/0g== 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 hb20si1131764ejc.261.2021.09.08.00.19.07; Wed, 08 Sep 2021 00:19:31 -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 S1349136AbhIHHRx (ORCPT + 99 others); Wed, 8 Sep 2021 03:17:53 -0400 Received: from mx20.baidu.com ([111.202.115.85]:35666 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1349278AbhIHHRu (ORCPT ); Wed, 8 Sep 2021 03:17:50 -0400 Received: from BJHW-Mail-Ex11.internal.baidu.com (unknown [10.127.64.34]) by Forcepoint Email with ESMTPS id 9FBFE19BFA08E349972A; Wed, 8 Sep 2021 15:16:41 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BJHW-Mail-Ex11.internal.baidu.com (10.127.64.34) 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:16:41 +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:16:41 +0800 From: Cai Huoqing To: CC: Li Yang , , , Subject: [PATCH 2/2] soc: fsl: rcpm: Make use of the helper function devm_platform_ioremap_resource() Date: Wed, 8 Sep 2021 15:16:30 +0800 Message-ID: <20210908071631.660-2-caihuoqing@baidu.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210908071631.660-1-caihuoqing@baidu.com> References: <20210908071631.660-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/fsl/rcpm.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/soc/fsl/rcpm.c b/drivers/soc/fsl/rcpm.c index 90d3f4060b0c..3d0cae30c769 100644 --- a/drivers/soc/fsl/rcpm.c +++ b/drivers/soc/fsl/rcpm.c @@ -146,7 +146,6 @@ static const struct dev_pm_ops rcpm_pm_ops = { static int rcpm_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; - struct resource *r; struct rcpm *rcpm; int ret; @@ -154,11 +153,7 @@ static int rcpm_probe(struct platform_device *pdev) if (!rcpm) return -ENOMEM; - r = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!r) - return -ENODEV; - - rcpm->ippdexpcr_base = devm_ioremap_resource(&pdev->dev, r); + rcpm->ippdexpcr_base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(rcpm->ippdexpcr_base)) { ret = PTR_ERR(rcpm->ippdexpcr_base); return ret; -- 2.25.1