summaryrefslogtreecommitdiff
path: root/drivers/memory
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>2022-04-19 16:28:55 +0200
committerKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>2022-04-26 09:48:25 +0200
commit083008defd83cb1ab6f9efaef6396bf4534ac6eb (patch)
tree04fda9c97a22b12aed8dc55eb03cd1eba930a2c3 /drivers/memory
parent734058b14de27682a176331ddd49fbdacdac1f46 (diff)
memory: ti-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-3-krzysztof.kozlowski@linaro.org
Diffstat (limited to 'drivers/memory')
-rw-r--r--drivers/memory/ti-aemif.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/memory/ti-aemif.c b/drivers/memory/ti-aemif.c
index 51d20c2ccb75..f81e7df8798a 100644
--- a/drivers/memory/ti-aemif.c
+++ b/drivers/memory/ti-aemif.c
@@ -328,7 +328,6 @@ static int aemif_probe(struct platform_device *pdev)
{
int i;
int ret = -ENODEV;
- struct resource *res;
struct device *dev = &pdev->dev;
struct device_node *np = dev->of_node;
struct device_node *child_np;
@@ -362,8 +361,7 @@ static int aemif_probe(struct platform_device *pdev)
else if (pdata)
aemif->cs_offset = pdata->cs_offset;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- aemif->base = devm_ioremap_resource(dev, res);
+ aemif->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(aemif->base)) {
ret = PTR_ERR(aemif->base);
goto error;