diff options
author | Yangtao Li <frank.li@vivo.com> | 2023-07-10 05:45:46 +0300 |
---|---|---|
committer | Damien Le Moal <dlemoal@kernel.org> | 2023-08-02 11:37:06 +0300 |
commit | 08c046e23595b284d91afb9a704148d25a27dad6 (patch) | |
tree | d927c579c646dc74aa90885c579781e64209be34 | |
parent | 7763320fb96629022c014eb7a8ae72ef82bbe2b8 (diff) | |
download | linux-08c046e23595b284d91afb9a704148d25a27dad6.tar.xz |
ata: sata_rcar: Convert to devm_platform_ioremap_resource()
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
-rw-r--r-- | drivers/ata/sata_rcar.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/ata/sata_rcar.c b/drivers/ata/sata_rcar.c index 97f01e4e8054..16ce4af3b894 100644 --- a/drivers/ata/sata_rcar.c +++ b/drivers/ata/sata_rcar.c @@ -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; |