diff options
author | Minghao Chi <chi.minghao@zte.com.cn> | 2022-11-11 16:47:12 +0800 |
---|---|---|
committer | Damien Le Moal <damien.lemoal@opensource.wdc.com> | 2022-11-12 10:58:56 +0900 |
commit | aebf1e26a84f2e38cf38aa228546adc2a2ede1fb (patch) | |
tree | 8991da9b9227661131d1b9891763157a2911b742 /drivers | |
parent | d5b560c014eddce747b2fd528d3071ded215b219 (diff) | |
download | linux-aebf1e26a84f2e38cf38aa228546adc2a2ede1fb.tar.bz2 |
ata: pata_ep93xx: 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.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/ata/pata_ep93xx.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/ata/pata_ep93xx.c b/drivers/ata/pata_ep93xx.c index 6c75a22db12b..47845d920075 100644 --- a/drivers/ata/pata_ep93xx.c +++ b/drivers/ata/pata_ep93xx.c @@ -931,8 +931,7 @@ static int ep93xx_pata_probe(struct platform_device *pdev) goto err_rel_gpio; } - mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - ide_base = devm_ioremap_resource(&pdev->dev, mem_res); + ide_base = devm_platform_get_and_ioremap_resource(pdev, 0, &mem_res); if (IS_ERR(ide_base)) { err = PTR_ERR(ide_base); goto err_rel_gpio; |