Skip to content

Commit 4f10987

Browse files
AngeloGioacchino Del RegnoChun-Kuang Hu
authored andcommitted
drm/mediatek: mtk_dpi: Use devm_platform_ioremap_resource()
Instead of the open-coded platform_get_resource, devm_ioremap_resource switch to devm_platform_ioremap_resource(), also dropping the useless struct resource pointer, which becomes unused. Signed-off-by: AngeloGioacchino Del Regno <[email protected]> Reviewed-by: Fei Shao <[email protected]> Reviewed-by: CK Hu <[email protected]> Link: https://patchwork.kernel.org/project/dri-devel/patch/[email protected]/ Signed-off-by: Chun-Kuang Hu <[email protected]>
1 parent 90c95c3 commit 4f10987

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/gpu/drm/mediatek/mtk_dpi.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,7 +1007,6 @@ static int mtk_dpi_probe(struct platform_device *pdev)
10071007
{
10081008
struct device *dev = &pdev->dev;
10091009
struct mtk_dpi *dpi;
1010-
struct resource *mem;
10111010
int ret;
10121011

10131012
dpi = devm_kzalloc(dev, sizeof(*dpi), GFP_KERNEL);
@@ -1038,8 +1037,7 @@ static int mtk_dpi_probe(struct platform_device *pdev)
10381037
dev_dbg(&pdev->dev, "Cannot find pinctrl active!\n");
10391038
}
10401039
}
1041-
mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
1042-
dpi->regs = devm_ioremap_resource(dev, mem);
1040+
dpi->regs = devm_platform_ioremap_resource(pdev, 0);
10431041
if (IS_ERR(dpi->regs))
10441042
return dev_err_probe(dev, PTR_ERR(dpi->regs),
10451043
"Failed to ioremap mem resource\n");

0 commit comments

Comments
 (0)