Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp344035pxb; Wed, 8 Sep 2021 02:31:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxcE4McyaaNXG8I7KzT6K1cJswOP/xRC+NxtKDTKyjJ2E/iLvFOkSkhHMBF6EXSFuLWsfm8 X-Received: by 2002:a02:ce37:: with SMTP id v23mr2782431jar.81.1631093499776; Wed, 08 Sep 2021 02:31:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631093499; cv=none; d=google.com; s=arc-20160816; b=UfCNkxqFpLOoslxzmzb98lai3pbyuIvZnR86JQE25nTNZgCnaG9wjBgdNkpoO4KTyE OYzS/AkNfVpe4EXmHyGhVsAGmrbqXMyWI9H4aDC9KdhXsSktxz+2IlVHkclrcPYnUo9R TEaNJvYgr8dQcRhAe94/OkEyiGLQo5LQBF8vcjQTSti2h7R1f2aM/oCXVjaB3KRPz8gi a5n2mDLOCG7caho4Ex/ggujn6iaBAB9NNoot4q91uy7ReV/1D9wznfm5FoA9fyaFmqJY YdyW4WcqRzjkGbUH9AYhYc0FgeHIWx4LhtFIBxrfIZXZxfFaC7auYwsWCBr5QbA6q70E EerQ== 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=Df0bgX2+gLcbCbMWsf4SpBpTlbdCrz5eN/rND4mSMJ4=; b=ia6cizXDzEsNZvn01Wgq1FBfW+qx763pfQMv1Ztx2KCRcIpB78HEG4zyZnOfs9Xze9 0f6B64UBh/BDP0W8c/ccRoK5qO76KZ0scG9pAGRfv+GgcOt9Uj4kl708cU4ogdJ55Uf7 /A0h5XATN/A21nWsgOi9nBoFX5roktOjXW/z6w+WCgeU90Sx4oqufTLwTsocsG7BdwEz Fj19AimJoge3FFfWEEVshk+dM2bvvZiNiCzF4QWAOR7io57Rw+aJLhKGpiX8C+rrMMBL ungYJt8u9yeRKKrXBSckTMnJKAwuU+g0fbVUup5PssT0pmr6PvSOOad1EuNoyLEdX3HA UUQA== 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 h22si1486839jal.57.2021.09.08.02.31.28; Wed, 08 Sep 2021 02:31:39 -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 S1348375AbhIHHRt (ORCPT + 99 others); Wed, 8 Sep 2021 03:17:49 -0400 Received: from mx21.baidu.com ([220.181.3.85]:35574 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1348809AbhIHHRs (ORCPT ); Wed, 8 Sep 2021 03:17:48 -0400 Received: from BJHW-Mail-Ex01.internal.baidu.com (unknown [10.127.64.11]) by Forcepoint Email with ESMTPS id A571623E707CC9D61193; Wed, 8 Sep 2021 15:16:38 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BJHW-Mail-Ex01.internal.baidu.com (10.127.64.11) 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:38 +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:38 +0800 From: Cai Huoqing To: CC: Li Yang , , , Subject: [PATCH 1/2] soc: fsl: guts: Make use of the helper function devm_platform_ioremap_resource() Date: Wed, 8 Sep 2021 15:16:29 +0800 Message-ID: <20210908071631.660-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) 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/guts.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/soc/fsl/guts.c b/drivers/soc/fsl/guts.c index d5e9a5f2c087..072473a16f4d 100644 --- a/drivers/soc/fsl/guts.c +++ b/drivers/soc/fsl/guts.c @@ -140,7 +140,6 @@ static int fsl_guts_probe(struct platform_device *pdev) { struct device_node *np = pdev->dev.of_node; struct device *dev = &pdev->dev; - struct resource *res; const struct fsl_soc_die_attr *soc_die; const char *machine; u32 svr; @@ -152,8 +151,7 @@ static int fsl_guts_probe(struct platform_device *pdev) guts->little_endian = of_property_read_bool(np, "little-endian"); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - guts->regs = devm_ioremap_resource(dev, res); + guts->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(guts->regs)) return PTR_ERR(guts->regs); -- 2.25.1