Skip to contentSkip to conversation

drivers/spi-rockchip.c : Use devm_platform_get_and_ioremap_resource makes code better

PATCH In review Lizhe 2 participants 2 messages Feb 26, 2023 – Mar 6, 2023

Subsystems (2)
lore
Share & tools
lore

Lizhe

author
#0 lore raw

PATCH 1/1 drivers/spi-rockchip.c : Use devm_platform_get_and_ioremap_resource makes code better

use devm_platform_get_and_ioremap replace platform_get_resource() and devm_ioremap_resource()

---
 drivers/spi/spi-rockchip.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/spi/spi-rockchip.c +1 -2
index 79242dc5272d..4f69c38d5a67 100644
@@ -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;
Signature · 1 line
2.34.1
maintainer
#1 lore raw
Quoted 4 lines · Lizhe

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