public inbox for linux-ide@vger.kernel.org
 help / color / mirror / Atom feed
From: Yangtao Li <frank.li@vivo.com>
To: Damien Le Moal <dlemoal@kernel.org>
Cc: Yangtao Li <frank.li@vivo.com>,
	linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 3/8] ata: ahci_xgene: Convert to devm_platform_ioremap_resource()
Date: Thu,  6 Jul 2023 20:42:33 +0800	[thread overview]
Message-ID: <20230706124239.23366-3-frank.li@vivo.com> (raw)
In-Reply-To: <20230706124239.23366-1-frank.li@vivo.com>

Use devm_platform_ioremap_resource() to simplify code.

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

diff --git a/drivers/ata/ahci_xgene.c b/drivers/ata/ahci_xgene.c
index eb773f2e28fc..f5deaf648663 100644
--- a/drivers/ata/ahci_xgene.c
+++ b/drivers/ata/ahci_xgene.c
@@ -755,20 +755,17 @@ static int xgene_ahci_probe(struct platform_device *pdev)
 	ctx->dev = dev;
 
 	/* Retrieve the IP core resource */
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
-	ctx->csr_core = devm_ioremap_resource(dev, res);
+	ctx->csr_core = devm_platform_ioremap_resource(pdev, 1);
 	if (IS_ERR(ctx->csr_core))
 		return PTR_ERR(ctx->csr_core);
 
 	/* Retrieve the IP diagnostic resource */
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 2);
-	ctx->csr_diag = devm_ioremap_resource(dev, res);
+	ctx->csr_diag = devm_platform_ioremap_resource(pdev, 2);
 	if (IS_ERR(ctx->csr_diag))
 		return PTR_ERR(ctx->csr_diag);
 
 	/* Retrieve the IP AXI resource */
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 3);
-	ctx->csr_axi = devm_ioremap_resource(dev, res);
+	ctx->csr_axi = devm_platform_ioremap_resource(pdev, 3);
 	if (IS_ERR(ctx->csr_axi))
 		return PTR_ERR(ctx->csr_axi);
 
-- 
2.39.0


  parent reply	other threads:[~2023-07-06 12:43 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-06 12:42 [PATCH 1/8] ata: ahci_octeon: Convert to devm_platform_ioremap_resource() Yangtao Li
2023-07-06 12:42 ` [PATCH 2/8] ata: ahci_seattle: " Yangtao Li
2023-07-06 12:42 ` Yangtao Li [this message]
2023-07-06 12:42 ` [PATCH 4/8] ahci: tegra: " Yangtao Li
2023-07-06 23:35   ` Damien Le Moal
2023-07-06 12:42 ` [PATCH 5/8] ata: sata_rcar: " Yangtao Li
2023-07-06 13:05   ` Geert Uytterhoeven
2023-07-06 21:10   ` Sergey Shtylyov
2023-07-06 23:37   ` Damien Le Moal
2023-07-06 12:42 ` [PATCH 6/8] pata: ixp4xx: Use devm_platform_get_and_ioremap_resource() Yangtao Li
2023-07-06 23:39   ` Damien Le Moal
2023-07-07 18:58   ` Sergey Shtylyov
2023-07-06 12:42 ` [PATCH 7/8] ata: pata_ftide010: " Yangtao Li
2023-07-06 18:02   ` Linus Walleij
2023-07-06 21:19   ` Sergey Shtylyov
2023-07-06 12:42 ` [PATCH 8/8] pata: imx: " Yangtao Li
2023-07-06 21:21   ` Sergey Shtylyov
2023-07-06 23:40   ` Damien Le Moal

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=20230706124239.23366-3-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 \
    /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