Commit 734058b1 authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski
Browse files

memory: emif: simplify platform_get_resource()



Use devm_platform_ioremap_resource() instead of platform_get_resource()
and devm_ioremap_resource().

Signed-off-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220419142859.380566-2-krzysztof.kozlowski@linaro.org
parent 933713f5
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -1107,7 +1107,6 @@ static struct emif_data *__init_or_module get_device_details(
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;