mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v3 01/11] ata: ahci_octeon: Convert to devm_platform_ioremap_resource()
@ 2023-07-10  2:45 Yangtao Li
  2023-07-10  2:45 ` [PATCH v3 02/11] ata: ahci_seattle: " Yangtao Li
                   ` (10 more replies)
  0 siblings, 11 replies; 15+ messages in thread
From: Yangtao Li @ 2023-07-10  2:45 UTC (permalink / raw)
  To: Damien Le Moal; +Cc: Yangtao Li, linux-ide, linux-kernel

Use devm_platform_ioremap_resource() to simplify code.

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

diff --git a/drivers/ata/ahci_octeon.c b/drivers/ata/ahci_octeon.c
index e89807fa928e..9accf8923891 100644
--- a/drivers/ata/ahci_octeon.c
+++ b/drivers/ata/ahci_octeon.c
@@ -31,13 +31,11 @@ static int ahci_octeon_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	struct device_node *node = dev->of_node;
-	struct resource *res;
 	void __iomem *base;
 	u64 cfg;
 	int ret;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	base = devm_ioremap_resource(&pdev->dev, res);
+	base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(base))
 		return PTR_ERR(base);
 
-- 
2.39.0


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2023-07-17  0:44 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-10  2:45 [PATCH v3 01/11] ata: ahci_octeon: Convert to devm_platform_ioremap_resource() Yangtao Li
2023-07-10  2:45 ` [PATCH v3 02/11] ata: ahci_seattle: " Yangtao Li
2023-07-10  2:45 ` [PATCH v3 03/11] ata: ahci_xgene: " Yangtao Li
2023-07-10  2:45 ` [PATCH v3 04/11] ata: ahci_tegra: " Yangtao Li
2023-07-10  2:45 ` [PATCH v3 05/11] ata: sata_rcar: drop useless initializer Yangtao Li
2023-07-10 12:28   ` Geert Uytterhoeven
2023-07-10  2:45 ` [PATCH v3 06/11] ata: sata_rcar: Remove unnecessary return value check Yangtao Li
2023-07-10 12:29   ` Geert Uytterhoeven
2023-07-10  2:45 ` [PATCH v3 07/11] ata: sata_rcar: Convert to devm_platform_ioremap_resource() Yangtao Li
2023-07-10 12:29   ` Geert Uytterhoeven
2023-07-10  2:45 ` [PATCH v3 08/11] ata: pata_ixp4xx: Use devm_platform_get_and_ioremap_resource() Yangtao Li
2023-07-10  2:45 ` [PATCH v3 09/11] ata: pata_ixp4xx: Remove unnecessary return value check Yangtao Li
2023-07-10  2:45 ` [PATCH v3 10/11] ata: pata_ftide010: Use devm_platform_get_and_ioremap_resource() Yangtao Li
2023-07-10  2:45 ` [PATCH v3 11/11] ata: pata_imx: " Yangtao Li
2023-07-17  0:44 ` [PATCH v3 01/11] ata: ahci_octeon: Convert to devm_platform_ioremap_resource() Damien Le Moal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®