mirror of
https://github.com/torvalds/linux.git
synced 2026-05-24 23:22:31 +02:00
drm/mediatek: Use devm_platform_get_and_ioremap_resource() in mtk_hdmi_ddc_probe()
A wrapper function is available since the commit 890cc39a87
("drivers: provide devm_platform_get_and_ioremap_resource()").
Thus reuse existing functionality instead of keeping duplicate
source code.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Link: https://patchwork.kernel.org/project/dri-devel/patch/2a4ecf78-20e7-4678-a67d-0d66956b07cc@web.de/
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
This commit is contained in:
parent
4cece76496
commit
d64e9d0fb6
|
|
@ -284,8 +284,7 @@ static int mtk_hdmi_ddc_probe(struct platform_device *pdev)
|
|||
return PTR_ERR(ddc->clk);
|
||||
}
|
||||
|
||||
mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
ddc->regs = devm_ioremap_resource(&pdev->dev, mem);
|
||||
ddc->regs = devm_platform_get_and_ioremap_resource(pdev, 0, &mem);
|
||||
if (IS_ERR(ddc->regs))
|
||||
return PTR_ERR(ddc->regs);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user