Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp3928177rwl; Mon, 27 Mar 2023 23:33:01 -0700 (PDT) X-Google-Smtp-Source: AKy350ZSNiulJVAHkmUH3v62992EvBGqOSiXpjGTQWgV0qpmuLKkwg33kamdNE5lfbKJSf8qKkJe X-Received: by 2002:a17:907:2063:b0:933:3814:e0f4 with SMTP id qp3-20020a170907206300b009333814e0f4mr15726074ejb.16.1679985180800; Mon, 27 Mar 2023 23:33:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679985180; cv=none; d=google.com; s=arc-20160816; b=MPWPh74d1A7DYGlBimwQUru7ZaCP3s/40fWxdmRekBkVtZYcsJo7bTT18nyvqQEfxT PxppKp4L858DOa8lePP8OWSw3Ld4wEe9RWi87w/EZk8eBUO+XdT7g3+Gmq9ZiKscw4iq uZSTfjaNerBu6VMqZT/XFx7jeIoOidImLV/74IFYhgOcChCyehSYhYr/jKQpfo+oQ56A 7ldWRzSeTT629DLwdX6s1LtWhd3xJmPzwHJxeORsPeg90TBrYTcVW4MgA7//4dnib/oK yFKE/TNTKw0IwHSVu2ll9TSS/Iazh/Neg7AEahnZHhTUnd+2lYXQSqy+coUZ0F823gvT lF/g== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jg28-20020a170907971c00b0093e0b659bc3si11180110ejc.493.2023.03.27.23.32.31; Mon, 27 Mar 2023 23:33:00 -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 S232662AbjC1G1K (ORCPT + 99 others); Tue, 28 Mar 2023 02:27:10 -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 Content-Transfer-Encoding: 8bit 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 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; -- 2.20.1.7.g153144c