Commit b93f07c
drm/vc4: move to devm_platform_ioremap_resource() usage
Replace platform_get_resource_byname + devm_ioremap_resource
with just devm_platform_ioremap_resource()
Used Coccinelle to do this change. SmPl patch:
//rule s/(devm_)platform_get_resource_byname +
//(devm_)ioremap/devm_platform_ioremap_resource.
@rule_3@
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);
...+>
v2: Change the SmPl patch to work on multiple occurences of
the pattern. This also fixes the compilation error.
v3: Do not convert "hd" resource to follow the rest of the
refactor. (Maxime)
v4: fix compiler error
Cc: Maxime Ripard <mripard@kernel.org>
Cc: Dave Stevenson <dave.stevenson@raspberrypi.com>
Cc: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
Link: https://lore.kernel.org/r/20250225-memory-drm-misc-next-v1-11-9d0e8761107a@redhat.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>1 parent 41cb3e2 commit b93f07c
1 file changed
+18
-35
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2926 | 2926 | | |
2927 | 2927 | | |
2928 | 2928 | | |
2929 | | - | |
2930 | | - | |
2931 | | - | |
2932 | | - | |
2933 | | - | |
2934 | | - | |
| 2929 | + | |
| 2930 | + | |
2935 | 2931 | | |
2936 | 2932 | | |
2937 | 2933 | | |
| 2934 | + | |
| 2935 | + | |
| 2936 | + | |
| 2937 | + | |
| 2938 | + | |
2938 | 2939 | | |
2939 | 2940 | | |
2940 | 2941 | | |
| |||
2943 | 2944 | | |
2944 | 2945 | | |
2945 | 2946 | | |
2946 | | - | |
2947 | | - | |
2948 | | - | |
2949 | | - | |
2950 | | - | |
| 2947 | + | |
| 2948 | + | |
2951 | 2949 | | |
2952 | 2950 | | |
2953 | 2951 | | |
2954 | | - | |
2955 | | - | |
2956 | | - | |
2957 | | - | |
2958 | | - | |
| 2952 | + | |
| 2953 | + | |
2959 | 2954 | | |
2960 | 2955 | | |
2961 | 2956 | | |
2962 | | - | |
2963 | | - | |
2964 | | - | |
2965 | | - | |
2966 | | - | |
| 2957 | + | |
| 2958 | + | |
2967 | 2959 | | |
2968 | 2960 | | |
2969 | 2961 | | |
2970 | | - | |
2971 | | - | |
2972 | | - | |
| 2962 | + | |
| 2963 | + | |
2973 | 2964 | | |
2974 | | - | |
2975 | 2965 | | |
2976 | 2966 | | |
2977 | 2967 | | |
2978 | | - | |
2979 | | - | |
2980 | | - | |
2981 | | - | |
2982 | | - | |
| 2968 | + | |
| 2969 | + | |
2983 | 2970 | | |
2984 | 2971 | | |
2985 | 2972 | | |
2986 | | - | |
2987 | | - | |
2988 | | - | |
2989 | | - | |
2990 | | - | |
| 2973 | + | |
2991 | 2974 | | |
2992 | 2975 | | |
2993 | 2976 | | |
| |||
0 commit comments