mirror of
https://github.com/torvalds/linux.git
synced 2026-05-12 16:18:45 +02:00
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>
This commit is contained in:
parent
555313ffde
commit
50cc9a322b
|
|
@ -1900,7 +1900,6 @@ int ltdc_load(struct drm_device *ddev)
|
|||
struct drm_panel *panel;
|
||||
struct drm_crtc *crtc;
|
||||
struct reset_control *rstc;
|
||||
struct resource *res;
|
||||
int irq, i, nb_endpoints;
|
||||
int ret = -ENODEV;
|
||||
|
||||
|
|
@ -1966,8 +1965,7 @@ int ltdc_load(struct drm_device *ddev)
|
|||
reset_control_deassert(rstc);
|
||||
}
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
ldev->regs = devm_ioremap_resource(dev, res);
|
||||
ldev->regs = devm_platform_ioremap_resource(pdev, 0);
|
||||
if (IS_ERR(ldev->regs)) {
|
||||
DRM_ERROR("Unable to get ltdc registers\n");
|
||||
ret = PTR_ERR(ldev->regs);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user