summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLizhe <sensor1010@163.com>2023-02-26 14:51:25 +0800
committerMark Brown <broonie@kernel.org>2023-03-05 23:41:26 +0000
commitd447fa6564788af2b8729f66157e1220ecf6d136 (patch)
tree2a92579e2a913b29f512884141f937c2c0f78bf8
parentf58ab0fa7a23e5e1f55c0c1df266bb0daf1c19cc (diff)
downloadlwn-d447fa6564788af2b8729f66157e1220ecf6d136.tar.gz
lwn-d447fa6564788af2b8729f66157e1220ecf6d136.zip
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() Signed-off-by: Lizhe <sensor1010@163.com> Link: https://lore.kernel.org/r/20230226065125.14086-1-sensor1010@163.com Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--drivers/spi/spi-rockchip.c3
1 files changed, 1 insertions, 2 deletions
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;