Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp3923311rwl; Mon, 27 Mar 2023 23:27:47 -0700 (PDT) X-Google-Smtp-Source: AKy350aiAlv9O9Uhbjs87h7XTvdc6SGc63+Ndd9nI69UZu8IjoMbbxUGnaS0PMCH2ksvfgUh3ZBj X-Received: by 2002:a05:6402:6d1:b0:502:24a4:b0ae with SMTP id n17-20020a05640206d100b0050224a4b0aemr14305169edy.14.1679984867253; Mon, 27 Mar 2023 23:27:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679984867; cv=none; d=google.com; s=arc-20160816; b=uKeoSfd17vmkSoyNsTPWY9N5hMlriL2JRyyUDrtT2kjaRRGNMn+CDygWhz7n3G55dz 5iKNP6Il7dzNhZa8Oy6AMS24fRyTs2fsCx2EfQP6COAvpQYJoyyib8j3WXBFjPGYJ3Hx rO+l6barqRvC1c4OStQAsFUhBQlziZa/PmvboYBc1GZdkGs/g9mheHoWc4oK6S0zsKJo Sh3KWvz3c9GExp8VZVLqp/a8lAlzcVabqLNUDrt9s3g4ZmLy0gIygkDwWLV1JafkuYts mEE1ezLCJYtE0f612u4Z2gNcs1Y6q7rMF+CzHc8PJaU/PhqjcClToN8i5DB5zybIvefJ hANg== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ay18-20020a056402203200b004fd1ff9dfd7si28040447edb.650.2023.03.27.23.27.22; Mon, 27 Mar 2023 23:27:47 -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 S232729AbjC1GVl (ORCPT + 99 others); Tue, 28 Mar 2023 02:21:41 -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 Content-Transfer-Encoding: 8bit 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 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); -- 2.20.1.7.g153144c