mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-11-01 23:04:54 +01:00
Replace platform_get_resource + devm_ioremap
with just devm_platform_ioremap_resource()
Used Coccinelle to do this change. SmPl patch:
@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: Address the return handling properly since
the new API returns error pointers and not NULL.
Cc: Chunyan Zhang <[email protected]>
Cc: Dmitry Baryshkov <[email protected]>
Signed-off-by: Anusha Srivatsa <[email protected]>
Reviewed-by: Chunyan Zhang <[email protected]>(v1)
Reviewed-by: Maxime Ripard <[email protected]>(v1)
Link: https://patchwork.freedesktop.org/patch/640854/?series=144073&rev=5