From patchwork Tue Mar 28 06:18:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Li X-Patchwork-Id: 75859 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2011727vqo; Mon, 27 Mar 2023 23:40:49 -0700 (PDT) X-Google-Smtp-Source: AKy350bnYcfNsADKvaP/jNbmQQf/scDfe8bYEYlW+bc/Q5soH0w+pma/x4Yy1LEGQRWg9M0H2Pi5 X-Received: by 2002:a17:906:fa1b:b0:922:2ba3:2348 with SMTP id lo27-20020a170906fa1b00b009222ba32348mr15668054ejb.7.1679985649248; Mon, 27 Mar 2023 23:40:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679985649; cv=none; d=google.com; s=arc-20160816; b=e38wwxK5k2B8iBzyKyC6miz5nQpWyBwDEJAhy1/eot82BNdCbt4sG0ZZt3h8a5jDdZ lmppaLgPxyi8RSLD8k11QAgqjuBaJMs7Xhpao7xtEtvYEaDSzBZd9z3e6K75D5TXTNXv FCT8pWEMjQ27fvQPm5XuXJE88i7udojubd1fLaZYYOgrtMaemFwfrFoRyEMZGvHFygUx 42SM+jdIp3bB9XJxeaCRFBCME10l/gp377ACusuilRYNUiGPKkxPJm2FiWbHUbYSwTHo YpRjG5OGOx+wCYNeeo9oFQ1BViF8k0cPhM+3dYQeBZ1dejiBQ55UtJRrU8sMzcZbKmT+ Ioqw== 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=epxpz/ahGSB38eVQWfO709ypInGmD5H6+X/K8m0TFD8=; b=cFXtwR7X6p0Cq01Kw38xKUcGjxw4eNK64zcf7/bK7OwBx9KHk5lu41ZkLOS6i8qCiu 6Fh7L7XsT47Gb7M6l2mZqqTdxbaWZUVL874/ohSyu5816LYTv970XnIlLWBXg8BEe0Cr TFm2cgChWPzg+a1jIy7HJuB4ln/Cv1m1PaIJjNOu0j+aB/9+qQSRy4rgNrfcjCCqdDmv 8LB+IDDvMoEOh3yPDpCnoip1gKCJgj54zouITHDr2ryeW0CtjVXZvg4eo3GEVOP9Vcw2 4v4qNLJi1uU6RTT7GDa7ZvusXsWrfiV7+2tIh0GULuQXVprEalnW/+Hvybexhzgh/8s5 MQKQ== 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 m20-20020a1709060d9400b009266f9b9f3esi24652288eji.756.2023.03.27.23.40.25; Mon, 27 Mar 2023 23:40:49 -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 S232732AbjC1GVm (ORCPT + 99 others); Tue, 28 Mar 2023 02:21:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36370 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232647AbjC1GVO (ORCPT ); Tue, 28 Mar 2023 02:21:14 -0400 Received: from out199-10.us.a.mail.aliyun.com (out199-10.us.a.mail.aliyun.com [47.90.199.10]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B1FD944A7; Mon, 27 Mar 2023 23:20:18 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R181e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045168;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=9;SR=0;TI=SMTPD_---0VerqKNV_1679984320; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0VerqKNV_1679984320) by smtp.aliyun-inc.com; Tue, 28 Mar 2023 14:18:40 +0800 From: Yang Li To: broonie@kernel.org Cc: alain.volmat@foss.st.com, mcoquelin.stm32@gmail.com, alexandre.torgue@foss.st.com, linux-spi@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Yang Li Subject: [PATCH -next] spi: stm32: Use devm_platform_get_and_ioremap_resource() Date: Tue, 28 Mar 2023 14:18:39 +0800 Message-Id: <20230328061839.82185-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,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?1761592632157218758?= X-GMAIL-MSGID: =?utf-8?q?1761592632157218758?= 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-stm32.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/spi/spi-stm32.c b/drivers/spi/spi-stm32.c index 8e6532d8babc..d6598e4116bd 100644 --- a/drivers/spi/spi-stm32.c +++ b/drivers/spi/spi-stm32.c @@ -1780,8 +1780,7 @@ static int stm32_spi_probe(struct platform_device *pdev) of_match_device(pdev->dev.driver->of_match_table, &pdev->dev)->data; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - spi->base = devm_ioremap_resource(&pdev->dev, res); + spi->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(spi->base)) return PTR_ERR(spi->base);