diff options
author | Yang Yingliang <yangyingliang@huawei.com> | 2022-09-24 15:18:54 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-09-26 17:10:41 +0200 |
commit | fc13b5a25e18b0de5e04b6f5616c60d71d2610ee (patch) | |
tree | acdfe37dc01c099acf00f00adcab5ff318919508 /drivers/spi | |
parent | spi: spi-fsl-lpspi: Use devm_platform_get_and_ioremap_resource() (diff) | |
download | linux-fc13b5a25e18b0de5e04b6f5616c60d71d2610ee.tar.xz linux-fc13b5a25e18b0de5e04b6f5616c60d71d2610ee.zip |
spi: spi-fsl-qspi: 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/20220924131854.964923-3-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/spi-fsl-qspi.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/spi/spi-fsl-qspi.c b/drivers/spi/spi-fsl-qspi.c index 46ae46a944c5..85cc71ba624a 100644 --- a/drivers/spi/spi-fsl-qspi.c +++ b/drivers/spi/spi-fsl-qspi.c @@ -867,8 +867,7 @@ static int fsl_qspi_probe(struct platform_device *pdev) platform_set_drvdata(pdev, q); /* find the resources */ - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "QuadSPI"); - q->iobase = devm_ioremap_resource(dev, res); + q->iobase = devm_platform_ioremap_resource_byname(pdev, "QuadSPI"); if (IS_ERR(q->iobase)) { ret = PTR_ERR(q->iobase); goto err_put_ctrl; |