mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 04:18:39 +08:00
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>
This commit is contained in:
parent
6dd7830cf7
commit
7f187e74c7
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user