memory: renesas-rpc-if: simplify platform_get_resource_byname()
Use devm_platform_ioremap_resource_byname() instead of platform_get_resource_byname() and devm_ioremap_resource(). Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20220419142859.380566-7-krzysztof.kozlowski@linaro.org
This commit is contained in:
parent
ef231fefa4
commit
2ca47b33a7
|
@ -229,8 +229,7 @@ int rpcif_sw_init(struct rpcif *rpc, struct device *dev)
|
|||
|
||||
rpc->dev = dev;
|
||||
|
||||
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "regs");
|
||||
rpc->base = devm_ioremap_resource(&pdev->dev, res);
|
||||
rpc->base = devm_platform_ioremap_resource_byname(pdev, "regs");
|
||||
if (IS_ERR(rpc->base))
|
||||
return PTR_ERR(rpc->base);
|
||||
|
||||
|
|
Loading…
Reference in New Issue