Commit 08c046e2 authored by Yangtao Li's avatar Yangtao Li Committed by Damien Le Moal
Browse files

ata: sata_rcar: Convert to devm_platform_ioremap_resource()



Use devm_platform_ioremap_resource() to simplify code.

Signed-off-by: default avatarYangtao Li <frank.li@vivo.com>
Reviewed-by: default avatarSergey Shtylyov <s.shtylyov@omp.ru>
Reviewed-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: default avatarDamien Le Moal <dlemoal@kernel.org>
parent 7763320f
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -861,7 +861,6 @@ static int sata_rcar_probe(struct platform_device *pdev)
	struct device *dev = &pdev->dev;
	struct ata_host *host;
	struct sata_rcar_priv *priv;
	struct resource *mem;
	int irq, ret;

	irq = platform_get_irq(pdev, 0);
@@ -887,8 +886,7 @@ static int sata_rcar_probe(struct platform_device *pdev)

	host->private_data = priv;

	mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
	priv->base = devm_ioremap_resource(dev, mem);
	priv->base = devm_platform_ioremap_resource(pdev, 0);
	if (IS_ERR(priv->base)) {
		ret = PTR_ERR(priv->base);
		goto err_pm_put;