aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnusha Srivatsa <asrivats@redhat.com>2025-02-25 17:20:51 -0500
committerMaxime Ripard <mripard@kernel.org>2025-02-26 15:27:08 +0100
commit41cb3e2150190359b2cb325ea1964870ba620709 (patch)
tree3564809959056f95e20ff1c5594ecc09ccfbb33e
parentdrm/stm: move to devm_platform_ioremap_resource() usage (diff)
downloadlinux-rng-41cb3e2150190359b2cb325ea1964870ba620709.tar.xz
linux-rng-41cb3e2150190359b2cb325ea1964870ba620709.zip
drm/tiny: move to devm_platform_ioremap_resource() usage
Replace platform_get_resource + devm_ioremap_resource with just devm_platform_ioremap_resource() Used Coccinelle to do this change. SmPl patch: @rule_1@ identifier res; expression ioremap_res; identifier pdev; @@ -struct resource *res; ... -res = platform_get_resource(pdev,...); -ioremap_res = devm_ioremap_resource(...); +ioremap_res = devm_platform_ioremap_resource(pdev,0); Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Maxime Ripard <mripard@kernel.org> Reviewed-by: Maxime Ripard <mripard@kernel.org> Acked-by: Alexey Brodkin <abrodkin@synopsys.com> Signed-off-by: Anusha Srivatsa <asrivats@redhat.com> Link: https://lore.kernel.org/r/20250225-memory-drm-misc-next-v1-10-9d0e8761107a@redhat.com Signed-off-by: Maxime Ripard <mripard@kernel.org>
-rw-r--r--drivers/gpu/drm/tiny/arcpgu.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpu/drm/tiny/arcpgu.c b/drivers/gpu/drm/tiny/arcpgu.c
index 2748d1f21d86..7cf0f0ea1bfe 100644
--- a/drivers/gpu/drm/tiny/arcpgu.c
+++ b/drivers/gpu/drm/tiny/arcpgu.c
@@ -253,7 +253,6 @@ static int arcpgu_load(struct arcpgu_drm_private *arcpgu)
struct device_node *encoder_node = NULL, *endpoint_node = NULL;
struct drm_connector *connector = NULL;
struct drm_device *drm = &arcpgu->drm;
- struct resource *res;
int ret;
arcpgu->clk = devm_clk_get(drm->dev, "pxlclk");
@@ -270,8 +269,7 @@ static int arcpgu_load(struct arcpgu_drm_private *arcpgu)
drm->mode_config.max_height = 1080;
drm->mode_config.funcs = &arcpgu_drm_modecfg_funcs;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- arcpgu->regs = devm_ioremap_resource(&pdev->dev, res);
+ arcpgu->regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(arcpgu->regs))
return PTR_ERR(arcpgu->regs);