diff options
author | AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> | 2023-07-26 10:22:44 +0200 |
---|---|---|
committer | Chun-Kuang Hu <chunkuang.hu@kernel.org> | 2023-08-09 23:01:51 +0000 |
commit | 4f109879451f04f4ea1f840406476edeb0b678dc (patch) | |
tree | 8a961efd1f686dbd3c475d25f3051f9409f17c0e /drivers | |
parent | 90c95c3892dde019182ceac984d4ca1f3c85844b (diff) | |
download | lwn-4f109879451f04f4ea1f840406476edeb0b678dc.tar.gz lwn-4f109879451f04f4ea1f840406476edeb0b678dc.zip |
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 <angelogioacchino.delregno@collabora.com>
Reviewed-by: Fei Shao <fshao@chromium.org>
Reviewed-by: CK Hu <ck.hu@mediatek.com>
Link: https://patchwork.kernel.org/project/dri-devel/patch/20230726082245.550929-6-angelogioacchino.delregno@collabora.com/
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/mediatek/mtk_dpi.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c index 3a140498c98a..244340df7468 100644 --- a/drivers/gpu/drm/mediatek/mtk_dpi.c +++ b/drivers/gpu/drm/mediatek/mtk_dpi.c @@ -1007,7 +1007,6 @@ static int mtk_dpi_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct mtk_dpi *dpi; - struct resource *mem; int ret; dpi = devm_kzalloc(dev, sizeof(*dpi), GFP_KERNEL); @@ -1038,8 +1037,7 @@ static int mtk_dpi_probe(struct platform_device *pdev) dev_dbg(&pdev->dev, "Cannot find pinctrl active!\n"); } } - mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); - dpi->regs = devm_ioremap_resource(dev, mem); + dpi->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(dpi->regs)) return dev_err_probe(dev, PTR_ERR(dpi->regs), "Failed to ioremap mem resource\n"); |