未验证 提交 c9e1bb72 编写于 作者: Y Yang Yingliang 提交者: Mark Brown

spi: spi-fsl-lpspi: 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: NYang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20220924131854.964923-2-yangyingliang@huawei.comSigned-off-by: NMark Brown <broonie@kernel.org>
上级 f96087a3
...@@ -855,8 +855,7 @@ static int fsl_lpspi_probe(struct platform_device *pdev) ...@@ -855,8 +855,7 @@ static int fsl_lpspi_probe(struct platform_device *pdev)
init_completion(&fsl_lpspi->xfer_done); init_completion(&fsl_lpspi->xfer_done);
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); fsl_lpspi->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
fsl_lpspi->base = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(fsl_lpspi->base)) { if (IS_ERR(fsl_lpspi->base)) {
ret = PTR_ERR(fsl_lpspi->base); ret = PTR_ERR(fsl_lpspi->base);
goto out_controller_put; goto out_controller_put;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册