Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2420006rwl; Sun, 26 Mar 2023 23:06:22 -0700 (PDT) X-Google-Smtp-Source: AKy350a/bjfGuVohH7G6tubyeS0fhqHnbWgrGSXg3c+PjYVH72810LU8V4sr43iXPAHntuKxSWZA X-Received: by 2002:aa7:c0ce:0:b0:501:d43e:d1dd with SMTP id j14-20020aa7c0ce000000b00501d43ed1ddmr10277610edp.33.1679897181956; Sun, 26 Mar 2023 23:06:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679897181; cv=none; d=google.com; s=arc-20160816; b=qOYTVleMDYANfVxkdCVSPlQRa+4MWymEP8l0ZVaN3Re7wXOh2kLDluNb1DLtah51sU 3uPEYPRez88BTqOrGOj7SQ8tG14BDf25F73VxLLdcZ5l+50ZvE8utwAxqheLahWZ1M21 cth8DIUj4eS41fB+OJslJJV3IN06rP2OjjJy4rNmTL/hqi51W+vjyF+GS47cS2k5oeTq 48R0UVE0dBBOmmbLO/Ci3t2IGoRt9nLgRB9wwlJ/uI3Wb+19bwr4vLeWSF37KrvEw1jS E90LVpIh8rQh2xfcgB5lJWQNwtc/XLlVEcVWI2FGvBjQEMk34J4krFdrBi7ElMyUcFHd TB3g== 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=7sjxTVGDycqg9eDX5QO0j2zcsl1z+IEMOA+v436lir4=; b=scmcj4CHXSxGknHVkc8pg6zjtDtWSg9etqUXJ3E/VijQnGlod7AuCy8X6gK6JSXqv/ M9CjmRzX3oGMl7bILz2umbNgcuOGoj/WhP3qjhHIWIYblKebX1OAlF3/8snZ37Z5uSUz 39YyJFUxsQ1j3x+1ZMD5RMVkVlwleDS55HTeWtFp/PoEHDkXHlucYJ1ORAfa5Z3M3/Gb lzOuHFetT6cfQr52YuKKKaW74KQHrzbbbEzJownGQWdVGPxcSt903oH8X/vnWWmWaSSA obV6vZhJDQke1J6L5DLc/P/s1mw6yzaTcTrn9nQw1TciYOJgoGLJOhIlbPWVtRniSWit h7hg== 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 ca24-20020aa7cd78000000b004bf2b13c5acsi27087011edb.607.2023.03.26.23.05.57; Sun, 26 Mar 2023 23:06:21 -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 S229950AbjC0GFY (ORCPT + 99 others); Mon, 27 Mar 2023 02:05:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32992 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229498AbjC0GFX (ORCPT ); Mon, 27 Mar 2023 02:05:23 -0400 Received: from out30-97.freemail.mail.aliyun.com (out30-97.freemail.mail.aliyun.com [115.124.30.97]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E7F49420A; Sun, 26 Mar 2023 23:05:20 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R311e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046056;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=7;SR=0;TI=SMTPD_---0Veh7Qp9_1679897117; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0Veh7Qp9_1679897117) by smtp.aliyun-inc.com; Mon, 27 Mar 2023 14:05:17 +0800 From: Yang Li To: broonie@kernel.org Cc: orsonzhai@gmail.com, baolin.wang@linux.alibaba.com, zhang.lyra@gmail.com, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, Yang Li Subject: [PATCH -next 1/2] spi: sprd-adi: Use devm_platform_get_and_ioremap_resource() Date: Mon, 27 Mar 2023 14:05:15 +0800 Message-Id: <20230327060516.93509-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-sprd-adi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/spi/spi-sprd-adi.c b/drivers/spi/spi-sprd-adi.c index 3b158124d79f..22e39c4c12c4 100644 --- a/drivers/spi/spi-sprd-adi.c +++ b/drivers/spi/spi-sprd-adi.c @@ -541,8 +541,7 @@ static int sprd_adi_probe(struct platform_device *pdev) dev_set_drvdata(&pdev->dev, ctlr); sadi = spi_controller_get_devdata(ctlr); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - sadi->base = devm_ioremap_resource(&pdev->dev, res); + sadi->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(sadi->base)) { ret = PTR_ERR(sadi->base); goto put_ctlr; -- 2.20.1.7.g153144c