From patchwork Fri Apr 28 05:27:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Li X-Patchwork-Id: 88447 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp720995vqo; Thu, 27 Apr 2023 22:59:18 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7oPnqRHZCkMftMgQUW3+zlXaPFXOOafbOgzM3ydjvMQuSGJVdh0KqTPOdUPnxjGN/RYPyJ X-Received: by 2002:a17:903:228c:b0:1a6:95c3:74a with SMTP id b12-20020a170903228c00b001a695c3074amr4979277plh.17.1682661558294; Thu, 27 Apr 2023 22:59:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682661558; cv=none; d=google.com; s=arc-20160816; b=GGTh733VMSv5MmSEbdbPFxIHkuiBpe3yPSQMcd1F4MdTolJTbp+gM5TkhC6es2aEEP gEDel59p8bxrLpcbQFYv/FULGCK/UrDJAm3GCWvft8TMd6j7gIJciqTJJcEQoPO2/d8i GMkDgpiaalfkTibJiXBudGMFuF9Vw/IS9FNp8Z7eYt9MKstYG/h8mqaAq0AumqBhrxFt D0QWxAJp5a27hSfPi7bKzvB7ubTCFLpZiNwVr/AzBVb0Qx2ZvC2FjZyMMAjO/EMrfe4C qt5PwifLF8X5LeC9irSidPsgsS09CHdGevdE0iGskMieGChNnouPo9Ab4cGzYX8sdiLi 0z1g== 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=15nxCuy690C0eT04RAJT2Ums9ldYgyHtO5psdyLt1eE=; b=MbBq8R9FilejcFbc+TuFMF+x4eNhl7mZ3Oz2d9upP4aWVACdycaGUK/vgNNImdJjbW gFzVsrXlRQkxu8XCcikkiB4blp9iSDTWLw4yjIiuW36Z7rb+9Op/bxU6Ijw8Xpe2ajIa UfKAWSpi1zf9JSnWSiZFv2a5UyiDoHpwc4sSVH9eJ5Cj9buSqlkWSCj+zfrcI5soMraY YZpBrrYsBa+9ZFEQFOoDJBtllZqpnP+/4wWI+etVICRJKZiHdULp6MHtbQ0eeWislmS4 0llBCkzZwdvFffDOU/dleHhiuwLOYLmmMFc5voULVH4PnzhbPcufhRDp96uJwGc6wRFk cgJA== 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 j9-20020a170903024900b001a63ba2c894si21580692plh.548.2023.04.27.22.59.03; Thu, 27 Apr 2023 22:59:18 -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 S1345091AbjD1F2I (ORCPT + 99 others); Fri, 28 Apr 2023 01:28:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229970AbjD1F2G (ORCPT ); Fri, 28 Apr 2023 01:28:06 -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 BB4501FD4 for ; Thu, 27 Apr 2023 22:28:04 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R981e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045176;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=11;SR=0;TI=SMTPD_---0VhA7VcY_1682659679; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0VhA7VcY_1682659679) by smtp.aliyun-inc.com; Fri, 28 Apr 2023 13:28:00 +0800 From: Yang Li To: shawnguo@kernel.org Cc: s.hauer@pengutronix.de, vkoul@kernel.org, kishon@kernel.org, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, linux-phy@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Yang Li Subject: [PATCH -next] phy: freescale: imx8m-pcie: Use devm_platform_ioremap_resource() Date: Fri, 28 Apr 2023 13:27:58 +0800 Message-Id: <20230428052758.38636-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?1764398526531435827?= X-GMAIL-MSGID: =?utf-8?q?1764398526531435827?= 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 --- drivers/phy/freescale/phy-fsl-imx8m-pcie.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/phy/freescale/phy-fsl-imx8m-pcie.c b/drivers/phy/freescale/phy-fsl-imx8m-pcie.c index afc63552ecaf..d4c92498ad1e 100644 --- a/drivers/phy/freescale/phy-fsl-imx8m-pcie.c +++ b/drivers/phy/freescale/phy-fsl-imx8m-pcie.c @@ -206,7 +206,6 @@ static int imx8_pcie_phy_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct device_node *np = dev->of_node; struct imx8_pcie_phy *imx8_phy; - struct resource *res; imx8_phy = devm_kzalloc(dev, sizeof(*imx8_phy), GFP_KERNEL); if (!imx8_phy) @@ -259,8 +258,7 @@ static int imx8_pcie_phy_probe(struct platform_device *pdev) "Failed to get PCIE PHY PERST control\n"); } - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - imx8_phy->base = devm_ioremap_resource(dev, res); + imx8_phy->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(imx8_phy->base)) return PTR_ERR(imx8_phy->base);