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:
Родитель
6dd7830cf7
Коммит
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);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче