mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-04 08:08:54 +00:00
ata: ahci_xgene: Convert to devm_platform_ioremap_resource()
Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li <frank.li@vivo.com> Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
This commit is contained in:
parent
04fd6f5633
commit
6dd7830cf7
1 changed files with 3 additions and 6 deletions
|
@ -755,20 +755,17 @@ static int xgene_ahci_probe(struct platform_device *pdev)
|
|||
ctx->dev = dev;
|
||||
|
||||
/* Retrieve the IP core resource */
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
|
||||
ctx->csr_core = devm_ioremap_resource(dev, res);
|
||||
ctx->csr_core = devm_platform_ioremap_resource(pdev, 1);
|
||||
if (IS_ERR(ctx->csr_core))
|
||||
return PTR_ERR(ctx->csr_core);
|
||||
|
||||
/* Retrieve the IP diagnostic resource */
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 2);
|
||||
ctx->csr_diag = devm_ioremap_resource(dev, res);
|
||||
ctx->csr_diag = devm_platform_ioremap_resource(pdev, 2);
|
||||
if (IS_ERR(ctx->csr_diag))
|
||||
return PTR_ERR(ctx->csr_diag);
|
||||
|
||||
/* Retrieve the IP AXI resource */
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 3);
|
||||
ctx->csr_axi = devm_ioremap_resource(dev, res);
|
||||
ctx->csr_axi = devm_platform_ioremap_resource(pdev, 3);
|
||||
if (IS_ERR(ctx->csr_axi))
|
||||
return PTR_ERR(ctx->csr_axi);
|
||||
|
||||
|
|
Loading…
Reference in a new issue