diff options
author | Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> | 2022-04-19 16:28:57 +0200 |
---|---|---|
committer | Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> | 2022-04-26 09:48:25 +0200 |
commit | dab022f22e3769260ef803eb7b70ec59df796a5a (patch) | |
tree | 8de73841b734ff71d6456ea78ac6d2995016cfbb /drivers/memory | |
parent | 8e6a257a173378d0fb42d64865545286f1f84ef6 (diff) | |
download | lwn-dab022f22e3769260ef803eb7b70ec59df796a5a.tar.gz lwn-dab022f22e3769260ef803eb7b70ec59df796a5a.zip |
memory: tegra: mc: simplify platform_get_resource()
Use devm_platform_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-5-krzysztof.kozlowski@linaro.org
Diffstat (limited to 'drivers/memory')
-rw-r--r-- | drivers/memory/tegra/mc.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/memory/tegra/mc.c b/drivers/memory/tegra/mc.c index 44b4a4080920..6d22d1ee432a 100644 --- a/drivers/memory/tegra/mc.c +++ b/drivers/memory/tegra/mc.c @@ -716,7 +716,6 @@ del_provider: static int tegra_mc_probe(struct platform_device *pdev) { - struct resource *res; struct tegra_mc *mc; u64 mask; int err; @@ -741,8 +740,7 @@ static int tegra_mc_probe(struct platform_device *pdev) /* length of MC tick in nanoseconds */ mc->tick = 30; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - mc->regs = devm_ioremap_resource(&pdev->dev, res); + mc->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(mc->regs)) return PTR_ERR(mc->regs); |