Skip to content

Commit 50cc9a3

Browse files
anushasrivatsmripard
authored andcommitted
drm/stm: 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: Yannick Fertre <yannick.fertre@foss.st.com> Cc: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com> Cc: Philippe Cornu <philippe.cornu@foss.st.com> Acked-by: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com> Signed-off-by: Anusha Srivatsa <asrivats@redhat.com> Acked-by: Raphaël Gallais-Pou <raphael.gallais-pou@foss.st.com> Link: https://lore.kernel.org/r/20250225-memory-drm-misc-next-v1-8-9d0e8761107a@redhat.com Signed-off-by: Maxime Ripard <mripard@kernel.org>
1 parent 555313f commit 50cc9a3

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/gpu/drm/stm/ltdc.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1900,7 +1900,6 @@ int ltdc_load(struct drm_device *ddev)
19001900
struct drm_panel *panel;
19011901
struct drm_crtc *crtc;
19021902
struct reset_control *rstc;
1903-
struct resource *res;
19041903
int irq, i, nb_endpoints;
19051904
int ret = -ENODEV;
19061905

@@ -1966,8 +1965,7 @@ int ltdc_load(struct drm_device *ddev)
19661965
reset_control_deassert(rstc);
19671966
}
19681967

1969-
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
1970-
ldev->regs = devm_ioremap_resource(dev, res);
1968+
ldev->regs = devm_platform_ioremap_resource(pdev, 0);
19711969
if (IS_ERR(ldev->regs)) {
19721970
DRM_ERROR("Unable to get ltdc registers\n");
19731971
ret = PTR_ERR(ldev->regs);

0 commit comments

Comments
 (0)