2
0
mirror of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-09-04 20:19:47 +08:00
linux/drivers/gpu/drm/sti
Anusha Srivatsa 67c4ea8267 drm/sti: move to devm_platform_ioremap_resource() usage
Replace platform_get_resource/_byname + devm_ioremap
with just devm_platform_ioremap_resource()

Used Coccinelle to do this change. SmPl patch:

@rule@
identifier res;
expression ioremap;
identifier pdev;
constant mem;
expression name;
@@
-struct resource *res;
...
-res = platform_get_resource_byname(pdev,mem,name);
<...
-if (!res) {
-...
-}
...>
-ioremap = devm_ioremap(...);
+ioremap = devm_platform_ioremap_resource_byname(pdev,name);

and
@rule_2@
identifier res;
expression ioremap;
identifier pdev;
@@
-struct resource *res;
...
-res = platform_get_resource(pdev,...);
<...
-if (!res) {
-...
-}
...>
-ioremap = devm_ioremap(...);
+ioremap = devm_platform_ioremap_resource(pdev,0);

v2: Fix compilation error.
v3: Handle returns properly since the new API return error pointers
and not NULL

Cc: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com>
Cc: Alain Volmat <alain.volmat@foss.st.com>
Reviewed-by: Maxime Ripard <mripard@kernel.org>(v2)
Acked-by: Raphael Gallais-Pou <rgallaispou@gmail.com>(v2)
Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
Link: https://patchwork.freedesktop.org/patch/640854/?series=144073&rev=5
2025-03-10 16:25:26 -04:00
..
Kconfig drm/sti: Run DRM default client setup 2024-09-26 09:31:27 +02:00
Makefile
NOTES
sti_awg_utils.c
sti_awg_utils.h
sti_compositor.c drm/sti: move to devm_platform_ioremap_resource() usage 2025-03-10 16:25:26 -04:00
sti_compositor.h
sti_crtc.c
sti_crtc.h
sti_cursor.c drm/sti: avoid potential dereference of error pointers 2024-09-23 21:40:52 +02:00
sti_cursor.h
sti_drv.c Merge remote-tracking branch 'drm/drm-next' into drm-misc-next 2024-12-09 16:35:21 +01:00
sti_drv.h
sti_dvo.c drm/sti: move to devm_platform_ioremap_resource() usage 2025-03-10 16:25:26 -04:00
sti_gdp.c drm/sti: avoid potential dereference of error pointers in sti_gdp_atomic_check 2024-09-23 21:40:41 +02:00
sti_gdp.h
sti_hda.c drm/sti: move to devm_platform_ioremap_resource() usage 2025-03-10 16:25:26 -04:00
sti_hdmi_tx3g4c28phy.c
sti_hdmi_tx3g4c28phy.h
sti_hdmi.c drm/sti: move to devm_platform_ioremap_resource() usage 2025-03-10 16:25:26 -04:00
sti_hdmi.h drm/sti/sti_hdmi: convert to using is_hdmi from display info 2023-05-02 18:48:58 +03:00
sti_hqvdp_lut.h
sti_hqvdp.c drm/sti: move to devm_platform_ioremap_resource() usage 2025-03-10 16:25:26 -04:00
sti_mixer.c drm/sti: Add __iomem for mixer_dbg_mxn's parameter 2024-11-26 14:02:25 +01:00
sti_mixer.h
sti_plane.c
sti_plane.h
sti_tvout.c drm/sti: move to devm_platform_ioremap_resource() usage 2025-03-10 16:25:26 -04:00
sti_vid.c
sti_vid.h
sti_vtg.c drm/sti: move to devm_platform_ioremap_resource() usage 2025-03-10 16:25:26 -04:00
sti_vtg.h