From 7f187e74c7f95e3998de65813ac5f3ec0dca5e9a Mon Sep 17 00:00:00 2001 From: Yangtao Li Date: Mon, 10 Jul 2023 10:45:43 +0800 Subject: [PATCH] ata: ahci_tegra: Convert to devm_platform_ioremap_resource() Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Acked-by: Thierry Reding Signed-off-by: Damien Le Moal --- drivers/ata/ahci_tegra.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/ata/ahci_tegra.c b/drivers/ata/ahci_tegra.c index 223b60a7c8c7..8703c2a4658b 100644 --- a/drivers/ata/ahci_tegra.c +++ b/drivers/ata/ahci_tegra.c @@ -530,8 +530,7 @@ static int tegra_ahci_probe(struct platform_device *pdev) tegra->pdev = pdev; tegra->soc = of_device_get_match_data(&pdev->dev); - res = platform_get_resource(pdev, IORESOURCE_MEM, 1); - tegra->sata_regs = devm_ioremap_resource(&pdev->dev, res); + tegra->sata_regs = devm_platform_ioremap_resource(pdev, 1); if (IS_ERR(tegra->sata_regs)) return PTR_ERR(tegra->sata_regs);