From patchwork Fri Apr 28 06:52:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Li X-Patchwork-Id: 88468 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp747210vqo; Fri, 28 Apr 2023 00:05:15 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6QFhZH69iw9lqXASzwI3moRLEGtnOq3Z7BNJ+3SIKLQEdsYCtdfXHoqgcp9kLU1siIXXnI X-Received: by 2002:a05:6a00:2195:b0:627:ea7a:ff46 with SMTP id h21-20020a056a00219500b00627ea7aff46mr6207133pfi.16.1682665514930; Fri, 28 Apr 2023 00:05:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682665514; cv=none; d=google.com; s=arc-20160816; b=WvG3Z4kFXI4eywUVqMzMb801y50AOJj6XtykwQGmW/vKiAvXvNkhE1j4T7r/+Lf22S tYymWCSTmCmPx8PArNTX+o0MsMVkYqAbBsMpF8X1FWgCfUrhy3fmQhn1aXIIbgZnt0Hr qGggnAomyVWXy28XFoQ9RSzLxeWR9UPYBCtE5Mblis7n1prhOnbfDfDYtrh7jHa0mYjL X7l8mR7oEFewo1Xgash0xZ2+CDTt8aDtFtr2V83VPxuqpmPvp8jo6jCHsz0hdJ+ul+MV DotMm//Z5/CNbIoupcR8XItV0haqq+ASTRQuIEDDVngsCNWNl2LmAPvNpyNbEaGvid+u 3V6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=QfHLG55PEwCy1Y0q5NrE+K/o2h1wJXNfiwdXD8qK+a4=; b=Hl8ubGguh7JMhQSvzBEfp4tXQ7iSgKmgVwZ1YIBPV/JFkkr8h9VU7sUuwT12TmDH8r oiRv5cJsF45aJMRR+kcVMihlonzUKgJisP7f4E3j8DpuGsGkKEmpdA2tua3GmuFkzdTt Kzm1lu+PsCPXMb6l6Cw2QYzDi6GJTfKdfnFhiZTbfRQKINB8U5VJ6NTEsOzUxndNTKTr +hDINHVVlEZZNFe3jqAziKuuczk9Y7IeKcRnZ+E2G7S8CPeYWThUp4UlNG6sUve64lAT PntytLNyRQRZ9xFVyJilFkd7iAb2NEbLWj5gMV3Qff/0BElCcqwa4ygId585xgt8fqgT qGOg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f2-20020aa79d82000000b006246677ca3dsi20259320pfq.287.2023.04.28.00.05.01; Fri, 28 Apr 2023 00:05:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345414AbjD1GwT (ORCPT + 99 others); Fri, 28 Apr 2023 02:52:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52882 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345379AbjD1GwR (ORCPT ); Fri, 28 Apr 2023 02:52:17 -0400 Received: from out30-112.freemail.mail.aliyun.com (out30-112.freemail.mail.aliyun.com [115.124.30.112]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A204E1FFB; Thu, 27 Apr 2023 23:52:15 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R431e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045192;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0VhAKGsB_1682664731; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0VhAKGsB_1682664731) by smtp.aliyun-inc.com; Fri, 28 Apr 2023 14:52:12 +0800 From: Yang Li To: agross@kernel.org Cc: andersson@kernel.org, konrad.dybcio@linaro.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Yang Li Subject: [PATCH -next] bus: qcom: Use devm_platform_ioremap_resource() Date: Fri, 28 Apr 2023 14:52:10 +0800 Message-Id: <20230428065210.30095-1-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1764402674595726226?= X-GMAIL-MSGID: =?utf-8?q?1764402674595726226?= Convert platform_get_resource(),devm_ioremap_resource() to a single call to devm_platform_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yang Li Reviewed-by: Caleb Connolly --- drivers/bus/qcom-ebi2.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/bus/qcom-ebi2.c b/drivers/bus/qcom-ebi2.c index c1fef1b4bd89..01e76bb05218 100644 --- a/drivers/bus/qcom-ebi2.c +++ b/drivers/bus/qcom-ebi2.c @@ -294,7 +294,6 @@ static int qcom_ebi2_probe(struct platform_device *pdev) struct device_node *np = pdev->dev.of_node; struct device_node *child; struct device *dev = &pdev->dev; - struct resource *res; void __iomem *ebi2_base; void __iomem *ebi2_xmem; struct clk *ebi2xclk; @@ -325,15 +324,13 @@ static int qcom_ebi2_probe(struct platform_device *pdev) goto err_disable_2x_clk; } - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - ebi2_base = devm_ioremap_resource(dev, res); + ebi2_base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(ebi2_base)) { ret = PTR_ERR(ebi2_base); goto err_disable_clk; } - res = platform_get_resource(pdev, IORESOURCE_MEM, 1); - ebi2_xmem = devm_ioremap_resource(dev, res); + ebi2_xmem = devm_platform_ioremap_resource(pdev, 1); if (IS_ERR(ebi2_xmem)) { ret = PTR_ERR(ebi2_xmem); goto err_disable_clk;