summaryrefslogtreecommitdiff
path: root/drivers/spi
diff options
context:
space:
mode:
authorJinjie Ruan <ruanjinjie@huawei.com>2024-08-20 20:38:18 +0800
committerMark Brown <broonie@kernel.org>2024-08-23 11:03:17 +0100
commit3ccea1dedef39b8fc1adb13dd38c6e0b69e728af (patch)
tree43ffdac7441c50d2832fb27385d039ceaa1e260c /drivers/spi
parent3bf2a5359b0bde22418705ec862ac5077312e4c2 (diff)
downloadlwn-3ccea1dedef39b8fc1adb13dd38c6e0b69e728af.tar.gz
lwn-3ccea1dedef39b8fc1adb13dd38c6e0b69e728af.zip
spi: atmel-quadspi: Simpify resource lookup
Use the devm_platform_ioremap_resource_byname() helper instead of calling platform_get_resource_byname() and devm_ioremap_resource() separately. Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com> Link: https://patch.msgid.link/20240820123818.1788432-1-ruanjinjie@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/atmel-quadspi.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/spi/atmel-quadspi.c b/drivers/spi/atmel-quadspi.c
index 5aaff3bee1b7..2b5c72176711 100644
--- a/drivers/spi/atmel-quadspi.c
+++ b/drivers/spi/atmel-quadspi.c
@@ -601,16 +601,14 @@ static int atmel_qspi_probe(struct platform_device *pdev)
aq->pdev = pdev;
/* Map the registers */
- res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "qspi_base");
- aq->regs = devm_ioremap_resource(&pdev->dev, res);
+ aq->regs = devm_platform_ioremap_resource_byname(pdev, "qspi_base");
if (IS_ERR(aq->regs)) {
dev_err(&pdev->dev, "missing registers\n");
return PTR_ERR(aq->regs);
}
/* Map the AHB memory */
- res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "qspi_mmap");
- aq->mem = devm_ioremap_resource(&pdev->dev, res);
+ aq->mem = devm_platform_ioremap_resource_byname(pdev, "qspi_mmap");
if (IS_ERR(aq->mem)) {
dev_err(&pdev->dev, "missing AHB memory\n");
return PTR_ERR(aq->mem);