From patchwork Mon Mar 27 06:05:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Li X-Patchwork-Id: 75224 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1303709vqo; Sun, 26 Mar 2023 23:19:53 -0700 (PDT) X-Google-Smtp-Source: AKy350bJQfvFY4AvSOuXEO/cnJSv/6SwHEPIL222X3PjMg0FDMJCkblYP2yEs3iFe/zbkysdSmX9 X-Received: by 2002:a17:906:4b08:b0:928:796d:71e8 with SMTP id y8-20020a1709064b0800b00928796d71e8mr11416742eju.3.1679897993538; Sun, 26 Mar 2023 23:19:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679897993; cv=none; d=google.com; s=arc-20160816; b=hoUorQRtzFUwb1tZ0gzrftNxKn22sjdFPBV7ubWMWC2m3j0HQDoP7TXhyiRviDgbBj 1h6m6mipNO3gBBNO4AI3hVyx3oYSmYCRq68Z02TKZN8RZ5jLP+181vz3QQVrFQP6fz1w BdTg1+g8lqBfQYBAhwiuFquTrviEtLTaHqYdKIp4SGyuLO92ahG+vnKTwTd78BoRx9Gg KN7YCcagkm2+iMR+NHuq0T4HRyv4Ye/xt37mO0wgYr9PB3xPlB85YG0zbfw1JQ7hzqxB HxQe8xgQ1BEoJMkbs/GI8EDdIjTkpkbkIPKK17GT3fYHQtvk/rU1S/RWm0LPwRPAdrDZ ypvA== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nb25-20020a1709071c9900b0093460eefb1csi11819749ejc.659.2023.03.26.23.19.29; Sun, 26 Mar 2023 23:19:53 -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 S229462AbjC0GFZ (ORCPT + 99 others); Mon, 27 Mar 2023 02:05:25 -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 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?1761500718162068947?= X-GMAIL-MSGID: =?utf-8?q?1761500718162068947?= 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 Reviewed-by: Baolin Wang --- 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; From patchwork Mon Mar 27 06:05:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Li X-Patchwork-Id: 75225 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1304158vqo; Sun, 26 Mar 2023 23:21:04 -0700 (PDT) X-Google-Smtp-Source: AKy350ZeVfbc6ACFWQtxOEmld+MJLzJS3eDJI2w0gI7kS9G7qqsw8ENmW0mQ3SUMb/YrB0prlwC0 X-Received: by 2002:a17:907:6e1b:b0:93f:2508:7203 with SMTP id sd27-20020a1709076e1b00b0093f25087203mr7887228ejc.43.1679898064568; Sun, 26 Mar 2023 23:21:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679898064; cv=none; d=google.com; s=arc-20160816; b=CVNBfOls4tAtcg6mXcZG41M3LlpH73btyjmk4mtML1PyeQFX4R1PcRY6gx5TUw7Dft LouOVpUf2aTcJhvpq5LeF7y1xYtsbVIfHESZ9LXOCV42NaO1GycQrr091be5V+g1oWTK lgbFbC2nM4E46uCmq3Ol1TYtnTdsG8QzLGlEYjOctKfTFNsOOi7uT6G5tlLfGW8iyB7I Q+BPsCooqH+jqqVGI/qOPWIXzR6MdrzdNwUu9Qa3oHmoWflqw+bL0glwZe0YYoGLOfYZ zbNw9e7KzlVSRi8o1EhGCWXpMXGV0M4/FUARq+NdrkhAvxttxd7HMNzdYhRMen8DKT7y jz1Q== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=ieD+43hJrvuiPuWmWIIhIggj8GxZFfzqXC6TmTlV7o0=; b=PdI8Ja/ezNj1xhWj2oR6nWCeHxKxDlM1ZxMtfHl9wzHHKQFgkRVh7KhQcP5f2Ou4Q2 tt6D5aD2ZVzM162wtPmusTDM7UtGitsRynKhC2eq4jCnaZZG6iykK2t7VARx9nYGFims Nw5Iel6mzwQ5TuJotOev9oaCOTRwee6gr9DxNGpO2gnm0QTkjktVYJg3epHlSFb9kmL4 UGPzAtQQmffTxkS14IrsadS+kKx2VljSxIN46Zz5rBZiGWwTKGY/am+SVEoug92qHv1p CpZm6jamGbHf/O1z0ap41h6f9+A8m03hpDoTEksUa5kissSvuxPkkXhTO7TywIkBYFYn uIGg== 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 hb33-20020a170907162100b0093defbd6294si8729319ejc.1051.2023.03.26.23.20.39; Sun, 26 Mar 2023 23:21:04 -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 S230135AbjC0GF3 (ORCPT + 99 others); Mon, 27 Mar 2023 02:05:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229947AbjC0GFY (ORCPT ); Mon, 27 Mar 2023 02:05:24 -0400 Received: from out30-101.freemail.mail.aliyun.com (out30-101.freemail.mail.aliyun.com [115.124.30.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7F3194221; Sun, 26 Mar 2023 23:05:22 -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=ay29a033018046049;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=7;SR=0;TI=SMTPD_---0Veh7QpZ_1679897119; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0Veh7QpZ_1679897119) by smtp.aliyun-inc.com; Mon, 27 Mar 2023 14:05:19 +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 2/2] spi: sprd: Use devm_platform_get_and_ioremap_resource() Date: Mon, 27 Mar 2023 14:05:16 +0800 Message-Id: <20230327060516.93509-2-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c In-Reply-To: <20230327060516.93509-1-yang.lee@linux.alibaba.com> References: <20230327060516.93509-1-yang.lee@linux.alibaba.com> 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?1761500793117274044?= X-GMAIL-MSGID: =?utf-8?q?1761500793117274044?= 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 Reviewed-by: Baolin Wang --- drivers/spi/spi-sprd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/spi/spi-sprd.c b/drivers/spi/spi-sprd.c index 702acaeebab2..518c7eaca84e 100644 --- a/drivers/spi/spi-sprd.c +++ b/drivers/spi/spi-sprd.c @@ -929,8 +929,7 @@ static int sprd_spi_probe(struct platform_device *pdev) return -ENOMEM; ss = spi_controller_get_devdata(sctlr); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - ss->base = devm_ioremap_resource(&pdev->dev, res); + ss->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(ss->base)) { ret = PTR_ERR(ss->base); goto free_controller;