diff options
author | Yang Yingliang <yangyingliang@huawei.com> | 2022-10-29 10:17:20 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-10-31 16:20:25 +0300 |
commit | 347ad8f295c66f3193d57cc5b69b6138f2e24231 (patch) | |
tree | f3fe955383913f4dfdd07e9605e933f4029022c9 | |
parent | 1793d36672eb8d86fb319cd28e056a154945506f (diff) | |
download | linux-347ad8f295c66f3193d57cc5b69b6138f2e24231.tar.xz |
spi: mxic: Use devm_platform_ioremap_resource_byname()
Use the devm_platform_ioremap_resource_byname() helper instead of
calling platform_get_resource_byname() and devm_ioremap_resource()
separately.
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20221029071720.3041094-1-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | drivers/spi/spi-mxic.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/spi/spi-mxic.c b/drivers/spi/spi-mxic.c index 65be8e085ab8..a3dba17390eb 100644 --- a/drivers/spi/spi-mxic.c +++ b/drivers/spi/spi-mxic.c @@ -772,8 +772,7 @@ static int mxic_spi_probe(struct platform_device *pdev) if (IS_ERR(mxic->send_dly_clk)) return PTR_ERR(mxic->send_dly_clk); - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "regs"); - mxic->regs = devm_ioremap_resource(&pdev->dev, res); + mxic->regs = devm_platform_ioremap_resource_byname(pdev, "regs"); if (IS_ERR(mxic->regs)) return PTR_ERR(mxic->regs); |