Commit 84cd6480 authored by Yangtao Li's avatar Yangtao Li Committed by Jassi Brar

mailbox: bcm-pdc: Use devm_platform_get_and_ioremap_resource()

Convert platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_get_and_ioremap_resource(), as this is exactly
what this function does.
Signed-off-by: default avatarYangtao Li <frank.li@vivo.com>
Signed-off-by: default avatarJassi Brar <jaswinder.singh@linaro.org>
parent 33d3bb9f
...@@ -1566,19 +1566,13 @@ static int pdc_probe(struct platform_device *pdev) ...@@ -1566,19 +1566,13 @@ static int pdc_probe(struct platform_device *pdev)
if (err) if (err)
goto cleanup_ring_pool; goto cleanup_ring_pool;
pdc_regs = platform_get_resource(pdev, IORESOURCE_MEM, 0); pdcs->pdc_reg_vbase = devm_platform_get_and_ioremap_resource(pdev, 0, &pdc_regs);
if (!pdc_regs) {
err = -ENODEV;
goto cleanup_ring_pool;
}
dev_dbg(dev, "PDC register region res.start = %pa, res.end = %pa",
&pdc_regs->start, &pdc_regs->end);
pdcs->pdc_reg_vbase = devm_ioremap_resource(&pdev->dev, pdc_regs);
if (IS_ERR(pdcs->pdc_reg_vbase)) { if (IS_ERR(pdcs->pdc_reg_vbase)) {
err = PTR_ERR(pdcs->pdc_reg_vbase); err = PTR_ERR(pdcs->pdc_reg_vbase);
goto cleanup_ring_pool; goto cleanup_ring_pool;
} }
dev_dbg(dev, "PDC register region res.start = %pa, res.end = %pa",
&pdc_regs->start, &pdc_regs->end);
/* create rx buffer pool after dt read to know how big buffers are */ /* create rx buffer pool after dt read to know how big buffers are */
err = pdc_rx_buf_pool_create(pdcs); err = pdc_rx_buf_pool_create(pdcs);
......
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