diff options
author | Lizhe <sensor1010@163.com> | 2023-02-26 14:51:25 +0800 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2023-03-05 23:41:26 +0000 |
commit | d447fa6564788af2b8729f66157e1220ecf6d136 (patch) | |
tree | 2a92579e2a913b29f512884141f937c2c0f78bf8 | |
parent | f58ab0fa7a23e5e1f55c0c1df266bb0daf1c19cc (diff) | |
download | lwn-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.c | 3 |
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; |