diff options
author | Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> | 2022-04-19 16:28:54 +0200 |
---|---|---|
committer | Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> | 2022-04-26 09:48:25 +0200 |
commit | 734058b14de27682a176331ddd49fbdacdac1f46 (patch) | |
tree | b082b15e7bd8b999515cd172d9752487766e44af /drivers/memory | |
parent | 933713f5f49b816aa13a6441e41d98febef84dbe (diff) | |
download | linux-734058b14de27682a176331ddd49fbdacdac1f46.tar.gz linux-734058b14de27682a176331ddd49fbdacdac1f46.tar.bz2 linux-734058b14de27682a176331ddd49fbdacdac1f46.zip |
memory: emif: 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-2-krzysztof.kozlowski@linaro.org
Diffstat (limited to 'drivers/memory')
-rw-r--r-- | drivers/memory/emif.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/memory/emif.c b/drivers/memory/emif.c index edf3ba7447ed..6c2a421b86e3 100644 --- a/drivers/memory/emif.c +++ b/drivers/memory/emif.c @@ -1107,7 +1107,6 @@ error: static int __init_or_module emif_probe(struct platform_device *pdev) { struct emif_data *emif; - struct resource *res; int irq, ret; if (pdev->dev.of_node) @@ -1126,8 +1125,7 @@ static int __init_or_module emif_probe(struct platform_device *pdev) emif->dev = &pdev->dev; platform_set_drvdata(pdev, emif); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - emif->base = devm_ioremap_resource(emif->dev, res); + emif->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(emif->base)) goto error; |