summaryrefslogtreecommitdiffstats
path: root/drivers/memory/ti-emif-pm.c
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>2022-04-19 16:28:56 +0200
committerKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>2022-04-26 09:48:25 +0200
commit8e6a257a173378d0fb42d64865545286f1f84ef6 (patch)
treec1d56e6c9efe6180d73f6fdb98d131f55e2c7798 /drivers/memory/ti-emif-pm.c
parent083008defd83cb1ab6f9efaef6396bf4534ac6eb (diff)
downloadlinux-8e6a257a173378d0fb42d64865545286f1f84ef6.tar.bz2
memory: ti-emif-pm: simplify platform_get_resource()
Use devm_platform_get_and_ioremap_resource() instead of platform_get_resource() and devm_ioremap_resource(). Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20220419142859.380566-4-krzysztof.kozlowski@linaro.org
Diffstat (limited to 'drivers/memory/ti-emif-pm.c')
-rw-r--r--drivers/memory/ti-emif-pm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/memory/ti-emif-pm.c b/drivers/memory/ti-emif-pm.c
index 179fec2da56d..31d6266f008c 100644
--- a/drivers/memory/ti-emif-pm.c
+++ b/drivers/memory/ti-emif-pm.c
@@ -290,9 +290,9 @@ static int ti_emif_probe(struct platform_device *pdev)
emif_data->pm_data.ti_emif_sram_config = (unsigned long)match->data;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- emif_data->pm_data.ti_emif_base_addr_virt = devm_ioremap_resource(dev,
- res);
+ emif_data->pm_data.ti_emif_base_addr_virt = devm_platform_get_and_ioremap_resource(pdev,
+ 0,
+ &res);
if (IS_ERR(emif_data->pm_data.ti_emif_base_addr_virt)) {
ret = PTR_ERR(emif_data->pm_data.ti_emif_base_addr_virt);
return ret;