diff options
| author | Jinjie Ruan <[email protected]> | 2024-08-20 12:38:18 +0000 |
|---|---|---|
| committer | Mark Brown <[email protected]> | 2024-08-23 10:03:17 +0000 |
| commit | 3ccea1dedef39b8fc1adb13dd38c6e0b69e728af (patch) | |
| tree | 43ffdac7441c50d2832fb27385d039ceaa1e260c | |
| parent | spi: wpcm-fiu: Use devm_platform_ioremap_resource_byname() (diff) | |
| download | kernel-3ccea1dedef39b8fc1adb13dd38c6e0b69e728af.tar.gz kernel-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 <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Mark Brown <[email protected]>
| -rw-r--r-- | drivers/spi/atmel-quadspi.c | 6 |
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); |
