Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Yang Yingliang and committed by
Mark Brown
347ad8f2 1793d366

+1 -2
+1 -2
drivers/spi/spi-mxic.c
··· 772 772 if (IS_ERR(mxic->send_dly_clk)) 773 773 return PTR_ERR(mxic->send_dly_clk); 774 774 775 - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "regs"); 776 - mxic->regs = devm_ioremap_resource(&pdev->dev, res); 775 + mxic->regs = devm_platform_ioremap_resource_byname(pdev, "regs"); 777 776 if (IS_ERR(mxic->regs)) 778 777 return PTR_ERR(mxic->regs); 779 778