Commit a008ae9f authored by Yang Yingliang's avatar Yang Yingliang Committed by Mark Brown

spi: bcm63xx: Use devm_platform_get_and_ioremap_resource()

Use the devm_platform_get_and_ioremap_resource() helper instead of calling
platform_get_resource() and devm_ioremap_resource() separately.
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20220928145852.1882221-1-yangyingliang@huawei.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 1cc0cbea
...@@ -547,8 +547,7 @@ static int bcm63xx_spi_probe(struct platform_device *pdev) ...@@ -547,8 +547,7 @@ static int bcm63xx_spi_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, master); platform_set_drvdata(pdev, master);
bs->pdev = pdev; bs->pdev = pdev;
r = platform_get_resource(pdev, IORESOURCE_MEM, 0); bs->regs = devm_platform_get_and_ioremap_resource(pdev, 0, &r);
bs->regs = devm_ioremap_resource(&pdev->dev, r);
if (IS_ERR(bs->regs)) { if (IS_ERR(bs->regs)) {
ret = PTR_ERR(bs->regs); ret = PTR_ERR(bs->regs);
goto out_err; goto out_err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment