From patchwork Tue Mar 28 06:26:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Li X-Patchwork-Id: 75865 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2013221vqo; Mon, 27 Mar 2023 23:44:48 -0700 (PDT) X-Google-Smtp-Source: AKy350b6RXZqz9t1pOUk+T5YTXTcnroRRZv3OaTCYwHcbGMoNV4rAIpMzB31uzy57ODTknd+ISqy X-Received: by 2002:a05:6402:349:b0:4c6:10a7:c422 with SMTP id r9-20020a056402034900b004c610a7c422mr16097796edw.18.1679985888539; Mon, 27 Mar 2023 23:44:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679985888; cv=none; d=google.com; s=arc-20160816; b=uJYqRaiacZY9/xbjrWr3EXxCDjtGGb6kfYVsVPWC5fLHK928pT+3fBOk5AU2yN+D5K akA2Xh0hYzjXZQrITfaPuFzL/oawnpl8HQdR7LXzZdccWQXe1lPmryf5KUyNR1K6noGy /Wp9GeuyC4iFavSMkMkmI0FX0JIu2f7IqvvvkJRvvJ1tSfu8U6UxitFmcHkufkkv/1E3 zGjdy6RdUb5HNM8zh182VoDzlQJ8Doz8HGdT5oEfKn2AldOzYBMICBk8PYo+9XpDDp50 L304nJidslRYVaYP22v0i0ro/jmTYUOMyDbQAVyOozm9hhPj7Yo5xAXApnTFLIlwfiAl Y4UQ== 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=LTXcozLMRSXtBslGdMaVuPzhAea5brGxJ5e3U6JJh0c=; b=fUTIpdCsVWUwYQQMM+pri9Eo/bzSBwlaZ6tfI6cM9hsOE0+3XYj2MaUoRvwmwufOyL 9fD0hgKCUIfdNMoqo9R5fkspATqDFN7059vD69A8NqepjyI9RNSa2e8s6HrDVgxuXFRq OfXXGt5FFODDGxj52otxvbMMdP2t0fD3J2ddE9YnmXy5uozILV0xRgagus17kZyqEvlQ 6wn+h3NhZ5D175R22bnJGa8Xz4UWQs8zEOaNOm41Q0DOAAvF+a5vIt8jiArr/imXPVVx IV/2AHoVh4O9HmcKFycsw5ZBguPV0UCugbsW2/14cgW0V3kzFpnAX7LembGukzKdymp9 X1iQ== 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 b12-20020aa7df8c000000b00501e229b755si19309761edy.437.2023.03.27.23.44.24; Mon, 27 Mar 2023 23:44:48 -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 S232709AbjC1G1L (ORCPT + 99 others); Tue, 28 Mar 2023 02:27:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232208AbjC1G0q (ORCPT ); Tue, 28 Mar 2023 02:26:46 -0400 Received: from out30-131.freemail.mail.aliyun.com (out30-131.freemail.mail.aliyun.com [115.124.30.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 044F41711; Mon, 27 Mar 2023 23:26:04 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R321e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046049;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=10;SR=0;TI=SMTPD_---0Ves-J4z_1679984761; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0Ves-J4z_1679984761) by smtp.aliyun-inc.com; Tue, 28 Mar 2023 14:26:01 +0800 From: Yang Li To: broonie@kernel.org Cc: shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Yang Li Subject: [PATCH -next] spi: imx: Use devm_platform_get_and_ioremap_resource() Date: Tue, 28 Mar 2023 14:26:00 +0800 Message-Id: <20230328062600.93160-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=-8.0 required=5.0 tests=ENV_AND_HDR_SPF_MATCH, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=unavailable 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?1761592882819033076?= X-GMAIL-MSGID: =?utf-8?q?1761592882819033076?= According to commit 890cc39a8799 ("drivers: provide devm_platform_get_and_ioremap_resource()"), convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yang Li --- drivers/spi/spi-imx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/spi/spi-imx.c b/drivers/spi/spi-imx.c index 1f2c7ad65ec8..9f8cee200e7c 100644 --- a/drivers/spi/spi-imx.c +++ b/drivers/spi/spi-imx.c @@ -1753,8 +1753,7 @@ static int spi_imx_probe(struct platform_device *pdev) init_completion(&spi_imx->xfer_done); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - spi_imx->base = devm_ioremap_resource(&pdev->dev, res); + spi_imx->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(spi_imx->base)) { ret = PTR_ERR(spi_imx->base); goto out_controller_put;