From patchwork Tue Mar 28 06:10:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Li X-Patchwork-Id: 75845 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2004848vqo; Mon, 27 Mar 2023 23:22:56 -0700 (PDT) X-Google-Smtp-Source: AKy350bhPxwHdEmjlzHYaa32oIJNSusdZdsKbbMP5ObIlrOcx0/DQfma6SOQIPgQGj7HKnrcfKFd X-Received: by 2002:a05:6402:5178:b0:4fa:57bf:141a with SMTP id d24-20020a056402517800b004fa57bf141amr16772203ede.32.1679984576597; Mon, 27 Mar 2023 23:22:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679984576; cv=none; d=google.com; s=arc-20160816; b=CTobvhQu6slZVscS1fsH02cAYj6OS0sdvTU/8QfS+Z8nYaZHsWStFN1+gNg/Q5f+La h1REOKsXAIYSpMw+3/Boj2XPtc/jcfM/YCEbTwZ4Qv0mqucoAxaU0wEz53ebzfSbqBoa Ho/YuK0LHVQMtlNOe3CTrmpoUI4xZtbgWd3gIGY7A/FJ8LWXoGp95wbF6nlLzzJ/dGOt wqe9FXLITP86BmMucFiQtrJWGypnMFIxMscVxhuCZuSsPbpvc5lTwDiVkOFxByHWyj4C 86NkuzWVWMg1WMMpLCQHJWx/YDi0EVRf8VNLQYQKjdK6tX66Ll4SbbHT0qv13xWdFuur eO6A== 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=RYzVUMqBw6jRgOuKk/+FA39pW4UTpuXfvo+JCtiFTWs=; b=mTsSn0sAPuHXsr8cpfkGy8zeQZpBeJmci1MLEvJ7H5VldG68C3MOb+fqet36UYrDlK eTxF8bXjwZhDuFVFwhcEeLovowx5WLuSOIlc8NE4U4zJzKS/YnnmWibwqtFK5adMJdxD HthQ3jWWVzgJ8O10fmV2/hu8UmzGEdwKK1HwKn5jRD5cxTFi5j74scaK+YfMdTRwGvYF Djgf93XVNjrNWBLlXE0zqwtJd71i8AjfdGRRiWt53bJrsEj7YuKOKv+wtZ8u6Wr5zw/J 1TwNjCf/skWCETPSStZlbG4LTdEXFE3+EPo+hHy0b3+2GeSc72Hn3YLglLWC7zEErD1E xgeQ== 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 w7-20020aa7da47000000b004fd1f955932si22401045eds.428.2023.03.27.23.22.32; Mon, 27 Mar 2023 23:22:56 -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 S232170AbjC1GKn (ORCPT + 99 others); Tue, 28 Mar 2023 02:10:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54454 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229436AbjC1GKk (ORCPT ); Tue, 28 Mar 2023 02:10:40 -0400 Received: from out30-111.freemail.mail.aliyun.com (out30-111.freemail.mail.aliyun.com [115.124.30.111]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E44FE30C0; Mon, 27 Mar 2023 23:10:35 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R151e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045192;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=9;SR=0;TI=SMTPD_---0VerqHuJ_1679983832; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0VerqHuJ_1679983832) by smtp.aliyun-inc.com; Tue, 28 Mar 2023 14:10:33 +0800 From: Yang Li To: broonie@kernel.org Cc: thierry.reding@gmail.com, jonathanh@nvidia.com, skomatineni@nvidia.com, ldewangan@nvidia.com, linux-tegra@vger.kernel.org, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, Yang Li Subject: [PATCH -next 1/2] spi: tegra114: Use devm_platform_get_and_ioremap_resource() Date: Tue, 28 Mar 2023 14:10:30 +0800 Message-Id: <20230328061031.70140-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?1761591507673597697?= X-GMAIL-MSGID: =?utf-8?q?1761591507673597697?= 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-tegra114.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/spi/spi-tegra114.c b/drivers/spi/spi-tegra114.c index 9e7d762d0ee6..488df681eaef 100644 --- a/drivers/spi/spi-tegra114.c +++ b/drivers/spi/spi-tegra114.c @@ -1342,8 +1342,7 @@ static int tegra_spi_probe(struct platform_device *pdev) goto exit_free_master; } - r = platform_get_resource(pdev, IORESOURCE_MEM, 0); - tspi->base = devm_ioremap_resource(&pdev->dev, r); + tspi->base = devm_platform_get_and_ioremap_resource(pdev, 0, &r); if (IS_ERR(tspi->base)) { ret = PTR_ERR(tspi->base); goto exit_free_master;