ata: pata_imx: Use devm_platform_get_and_ioremap_resource()
Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yangtao Li <frank.li@vivo.com> Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru> Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
This commit is contained in:
parent
2ade28916d
commit
282298e95b
|
@ -164,8 +164,7 @@ static int pata_imx_probe(struct platform_device *pdev)
|
||||||
ap->pio_mask = ATA_PIO4;
|
ap->pio_mask = ATA_PIO4;
|
||||||
ap->flags |= ATA_FLAG_SLAVE_POSS;
|
ap->flags |= ATA_FLAG_SLAVE_POSS;
|
||||||
|
|
||||||
io_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
priv->host_regs = devm_platform_get_and_ioremap_resource(pdev, 0, &io_res);
|
||||||
priv->host_regs = devm_ioremap_resource(&pdev->dev, io_res);
|
|
||||||
if (IS_ERR(priv->host_regs)) {
|
if (IS_ERR(priv->host_regs)) {
|
||||||
ret = PTR_ERR(priv->host_regs);
|
ret = PTR_ERR(priv->host_regs);
|
||||||
goto err;
|
goto err;
|
||||||
|
|
Loading…
Reference in New Issue