public inbox for linux-ide@vger.kernel.org
 help / color / mirror / Atom feed
From: Yangtao Li <frank.li@vivo.com>
To: Sergey Shtylyov <s.shtylyov@omp.ru>, Damien Le Moal <dlemoal@kernel.org>
Cc: Yangtao Li <frank.li@vivo.com>,
	linux-ide@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH v2 07/11] ata: sata_rcar: Convert to devm_platform_ioremap_resource()
Date: Fri,  7 Jul 2023 17:55:09 +0800	[thread overview]
Message-ID: <20230707095513.64224-7-frank.li@vivo.com> (raw)
In-Reply-To: <20230707095513.64224-1-frank.li@vivo.com>

Use devm_platform_ioremap_resource() to simplify code.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 drivers/ata/sata_rcar.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/ata/sata_rcar.c b/drivers/ata/sata_rcar.c
index 43c55ac89daa..63f8337c2a98 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;
-- 
2.39.0


  parent reply	other threads:[~2023-07-07  9:56 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-07  9:55 [PATCH v2 01/11] ata: ahci_octeon: Convert to devm_platform_ioremap_resource() Yangtao Li
2023-07-07  9:55 ` [PATCH v2 02/11] ata: ahci_seattle: " Yangtao Li
2023-07-07  9:55 ` [PATCH v2 03/11] ata: ahci_xgene: " Yangtao Li
2023-07-07  9:55 ` [PATCH v2 04/11] ata: ahci_tegra: " Yangtao Li
2023-07-07 12:49   ` Thierry Reding
2023-07-07  9:55 ` [PATCH v2 05/11] ata: sata_rcar: drop useless initializer Yangtao Li
2023-07-07 19:02   ` Sergey Shtylyov
2023-07-07  9:55 ` [PATCH v2 06/11] ata: sata_rcar: Remove unnecessary return value check Yangtao Li
2023-07-07 19:06   ` Sergey Shtylyov
2023-07-07  9:55 ` Yangtao Li [this message]
2023-07-07 19:10   ` [PATCH v2 07/11] ata: sata_rcar: Convert to devm_platform_ioremap_resource() Sergey Shtylyov
2023-07-07  9:55 ` [PATCH v2 08/11] ata: pata_ixp4xx: Use devm_platform_get_and_ioremap_resource() Yangtao Li
2023-07-07 19:38   ` Sergey Shtylyov
2023-07-07  9:55 ` [PATCH v2 09/11] ata: pata_ixp4xx: Remove unnecessary return value check Yangtao Li
2023-07-07 19:43   ` Sergey Shtylyov
2023-07-07  9:55 ` [PATCH v2 10/11] ata: pata_ftide010: Use devm_platform_get_and_ioremap_resource() Yangtao Li
2023-07-07  9:55 ` [PATCH v2 11/11] ata: pata_imx: " Yangtao Li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230707095513.64224-7-frank.li@vivo.com \
    --to=frank.li@vivo.com \
    --cc=dlemoal@kernel.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=s.shtylyov@omp.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox