summaryrefslogtreecommitdiff
path: root/drivers/ata/ahci_tegra.c
diff options
context:
space:
mode:
authorYangtao Li <frank.li@vivo.com>2023-07-10 10:45:43 +0800
committerDamien Le Moal <dlemoal@kernel.org>2023-08-02 17:37:06 +0900
commit7f187e74c7f95e3998de65813ac5f3ec0dca5e9a (patch)
tree9112372cdce48c8021ecaa2db9f9df19d3929eef /drivers/ata/ahci_tegra.c
parent6dd7830cf7650ca59834370ecd94cc7510ade527 (diff)
ata: ahci_tegra: Convert to devm_platform_ioremap_resource()
Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li <frank.li@vivo.com> Acked-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Diffstat (limited to 'drivers/ata/ahci_tegra.c')
-rw-r--r--drivers/ata/ahci_tegra.c3
1 files changed, 1 insertions, 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);