ata: ep93xx: use devm_platform_get_and_ioremap_resource()
PATCH 1/1 ata: ep93xx: use devm_platform_get_and_ioremap_resource()
From: Minghao Chi <[email protected]>
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.
--- drivers/ata/pata_ep93xx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/ata/pata_ep93xx.c +1 -2
@@ -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;
Signature · 1 line
2.25.1
Hello!
Quoted 8 lines · On 11/11/22 11:47 AM, [email protected] wrote:
From: Minghao Chi <[email protected]>
Convert
platform_get_resource(),devm_ioremap_resource()to a single call todevm_platform_get_and_ioremap_resource(), as this is exactly what this function does.Reported-by Zeal Robot <[email protected]>Signed-off-by Minghao Chi <[email protected]>
[...]
MBR, Sergey
Damien Le Moal
AppliedQuoted 17 lines · On 11/11/22 17:47, [email protected] wrote:
From: Minghao Chi <[email protected]>
Convert
platform_get_resource(),devm_ioremap_resource()to a single call todevm_platform_get_and_ioremap_resource(), as this is exactly what this function does.Reported-by Zeal Robot <[email protected]>Signed-off-by Minghao Chi <[email protected]>--- drivers/ata/pata_ep93xx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/ata/pata_ep93xx.c +0
-0
drivers/ata/pata_ep93xx.c static int ep93xx_pata_probe(struct platform_device *pdev) · line 937
Quoted 9 lines
drivers/ata/pata_ep93xx.c +1
-2@@ -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;
Applied to for-6.2 with the title chaged to "ata: pata_ep93xx: use...". Thanks !
Signature · 2 lines
Damien Le Moal Western Digital Research