diff options
author | Yangtao Li <frank.li@vivo.com> | 2023-07-10 10:45:50 +0800 |
---|---|---|
committer | Damien Le Moal <dlemoal@kernel.org> | 2023-08-02 17:37:06 +0900 |
commit | 282298e95b7623330c0ab08abd0a19e43f5d7472 (patch) | |
tree | acf846229b674682b6dd0df1ad87e174e0295300 /drivers/ata/pata_imx.c | |
parent | 2ade28916d20cc8fae0dd25da58a75ad62487424 (diff) |
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>
Diffstat (limited to 'drivers/ata/pata_imx.c')
-rw-r--r-- | drivers/ata/pata_imx.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/ata/pata_imx.c b/drivers/ata/pata_imx.c index 4013f28679a9..65d09ec94c12 100644 --- a/drivers/ata/pata_imx.c +++ b/drivers/ata/pata_imx.c @@ -164,8 +164,7 @@ static int pata_imx_probe(struct platform_device *pdev) ap->pio_mask = ATA_PIO4; ap->flags |= ATA_FLAG_SLAVE_POSS; - io_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - priv->host_regs = devm_ioremap_resource(&pdev->dev, io_res); + priv->host_regs = devm_platform_get_and_ioremap_resource(pdev, 0, &io_res); if (IS_ERR(priv->host_regs)) { ret = PTR_ERR(priv->host_regs); goto err; |