[v1] drivers/spi-rockchip.c : Use devm_platform_get_and_ioremap_resource makes code better
Message ID | 20230226065125.14086-1-sensor1010@163.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1836182wrd; Sat, 25 Feb 2023 23:22:46 -0800 (PST) X-Google-Smtp-Source: AK7set8XV4LSqXi6rWGo1CICSely1hoWA/lrPb0NoGclsF2TU+OM/4PcU4a/r+HvqdpMqAx/2n1T X-Received: by 2002:a17:907:c244:b0:8b1:4b6d:c57a with SMTP id tj4-20020a170907c24400b008b14b6dc57amr5070453ejc.21.1677396166419; Sat, 25 Feb 2023 23:22:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677396166; cv=none; d=google.com; s=arc-20160816; b=YrZ5EwqjeOF6y5Jzx1xn+N+GO06OPklH3+DZQhAL9cCy7Gvw2zt239IdnzhngdZ2kI L7f8v93eE4zHv5HG7gcJy+T1E09x/hFpXzj+8S/IHMJKZLTmISDL3Rll24pRtCcyanI4 H3pT0GM+XLxzKwFAt6GRq5dcOMlheROjdbkl+SVaydvC25qpIKcO4vxkEnJusRRk3Sip BezYu6P5zY/QJ/2StqPNBs9j8VSo65+gF7bxmhtVbnBhHFgAA5lJN110OKMQxKoJa0CB Jmm5WqupUMPhsWnN27vDtoQAHbLeTD7LVzuK++rXTRNXK6v73mGMRNFFpQhonWNJxqmt 9+WQ== 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:dkim-signature; bh=CgKfIDTe7iV4Ey58WdGr3+soXUsjSl47zqi0NmIEK+E=; b=KQKLJzSY+R4tFwjDy12awWlrW7j0tHiYRiF48sOPGtZCs+Zkh3rZj3tKtIKZO9oREn lrzOGeTGHWCcLfUgOco3ZX2+GCHGbhYXXMn2evbyYx/2RYAesGe1/ndRreA+v2eR89Pl M+sj1ebFOxldSQP1rUeQ72D/5PYl57G7aWtEZfkq6fSu7DOeSEfmaYHfUZ0tCupjNXXs JhdLS57MxNhAAvNMnmBRCfAW56GEse0JapJzewJunz4z8dCeAQsDXGHnQ6JoQ4H+bQ/6 Bsv/VOdZjRfY+wf+66L6CyVHNqu3V7VOxKAT/4P96NQ5zRuZvSPiHaH4TJOix8Bp+ZAQ Qsqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=UZTcm52S; 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=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n21-20020a05640206d500b004ad6fc89f88si5043555edy.57.2023.02.25.23.22.20; Sat, 25 Feb 2023 23:22:46 -0800 (PST) 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; dkim=pass header.i=@163.com header.s=s110527 header.b=UZTcm52S; 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=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229569AbjBZGwl (ORCPT <rfc822;guoshuai5156@gmail.com> + 99 others); Sun, 26 Feb 2023 01:52:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38594 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229470AbjBZGwk (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sun, 26 Feb 2023 01:52:40 -0500 Received: from m12.mail.163.com (m12.mail.163.com [220.181.12.215]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C9FBE14997; Sat, 25 Feb 2023 22:52:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=CgKfI DTe7iV4Ey58WdGr3+soXUsjSl47zqi0NmIEK+E=; b=UZTcm52Seih1hSUrqYgeY 5WR+ajYOaTkT8TkjjZRMcqF2IUgyTwNuHeicuhlDtI74r8dUrcSQbSSoFFenZFus SHTeFTBuUuaOJws5nox2AHtJXC+ASJJvGHz8Rh9ZCAzrV7aIscWHfybr59qaXZXe y7h/Tn/pPRPZeTacv7h05g= Received: from lizhe.. (unknown [120.245.132.180]) by zwqz-smtp-mta-g4-4 (Coremail) with SMTP id _____wAXpb1vAftjDbgABQ--.19532S4; Sun, 26 Feb 2023 14:52:10 +0800 (CST) From: Lizhe <sensor1010@163.com> To: broonie@kernel.org, heiko@sntech.de Cc: linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, Lizhe <sensor1010@163.com> Subject: [PATCH v1] drivers/spi-rockchip.c : Use devm_platform_get_and_ioremap_resource makes code better Date: Sun, 26 Feb 2023 14:51:25 +0800 Message-Id: <20230226065125.14086-1-sensor1010@163.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: _____wAXpb1vAftjDbgABQ--.19532S4 X-Coremail-Antispam: 1Uf129KBjvdXoW7Xw1UAF1kZF18CFyrXF1DZFb_yoWfGFX_ua 1Uur4xGr48ArsYya1Ykw13CFWIvanYgr97GF4jqFZxtF4DXr12vrWrurn5JF1UZwsrAr9r Gr9Fqr1avF98AjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7xRM5l8UUUUUU== X-Originating-IP: [120.245.132.180] X-CM-SenderInfo: 5vhq20jurqiii6rwjhhfrp/xtbBlwAiq2I0YM1zuQAAsv X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,SPF_HELO_NONE,SPF_PASS autolearn=ham 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758877362610120532?= X-GMAIL-MSGID: =?utf-8?q?1758877362610120532?= |
Series |
[v1] drivers/spi-rockchip.c : Use devm_platform_get_and_ioremap_resource makes code better
|
|
Commit Message
Lizhe
Feb. 26, 2023, 6:51 a.m. UTC
use devm_platform_get_and_ioremap replace platform_get_resource()
and devm_ioremap_resource()
Signed-off-by: Lizhe <sensor1010@163.com>
---
drivers/spi/spi-rockchip.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
Comments
On Sun, 26 Feb 2023 14:51:25 +0800, Lizhe wrote: > use devm_platform_get_and_ioremap replace platform_get_resource() > and devm_ioremap_resource() > > Applied to https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next Thanks! [1/1] drivers/spi-rockchip.c : Use devm_platform_get_and_ioremap_resource makes code better commit: d447fa6564788af2b8729f66157e1220ecf6d136 All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark
diff --git a/drivers/spi/spi-rockchip.c b/drivers/spi/spi-rockchip.c index 79242dc5272d..4f69c38d5a67 100644 --- a/drivers/spi/spi-rockchip.c +++ b/drivers/spi/spi-rockchip.c @@ -775,8 +775,7 @@ static int rockchip_spi_probe(struct platform_device *pdev) ctlr->slave = slave_mode; /* Get basic io resource and map it */ - mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); - rs->regs = devm_ioremap_resource(&pdev->dev, mem); + rs->regs = devm_platform_get_and_ioremap_resource(pdev, 0, &mem); if (IS_ERR(rs->regs)) { ret = PTR_ERR(rs->regs); goto err_put_ctlr;