Skip to content

Commit fc13b5a

Browse files
Yang Yingliangbroonie
authored andcommitted
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>
1 parent c9e1bb7 commit fc13b5a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/spi/spi-fsl-qspi.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -867,8 +867,7 @@ static int fsl_qspi_probe(struct platform_device *pdev)
867867
platform_set_drvdata(pdev, q);
868868

869869
/* find the resources */
870-
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "QuadSPI");
871-
q->iobase = devm_ioremap_resource(dev, res);
870+
q->iobase = devm_platform_ioremap_resource_byname(pdev, "QuadSPI");
872871
if (IS_ERR(q->iobase)) {
873872
ret = PTR_ERR(q->iobase);
874873
goto err_put_ctrl;

0 commit comments

Comments
 (0)