lkml.org 
[lkml]   [2022]   [Nov]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH linux-next] ARM: PXA: use devm platform ioremap resource()
From: zhang songyi <zhang.songyi@zte.com.cn>

Use the devm_platform_ioremap_resource() helper instead of
calling platform_get_resource() and devm_ioremap_resource()
separately

Signed-off-by: zhang songyi <zhang.songyi@zte.com.cn>
---
arch/arm/mach-pxa/pxa_cplds_irqs.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/arch/arm/mach-pxa/pxa_cplds_irqs.c b/arch/arm/mach-pxa/pxa_cplds_irqs.c
index eda5a47d7fbb..e94b340589ed 100644
--- a/arch/arm/mach-pxa/pxa_cplds_irqs.c
+++ b/arch/arm/mach-pxa/pxa_cplds_irqs.c
@@ -104,7 +104,6 @@ static int cplds_resume(struct platform_device *pdev)

static int cplds_probe(struct platform_device *pdev)
{
- struct resource *res;
struct cplds *fpga;
int ret;
int base_irq;
@@ -127,8 +126,7 @@ static int cplds_probe(struct platform_device *pdev)
return ret;
}

- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- fpga->base = devm_ioremap_resource(&pdev->dev, res);
+ fpga->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(fpga->base))
return PTR_ERR(fpga->base);

--
2.15.2
\
 
 \ /
  Last update: 2022-11-30 08:38    [W:0.033 / U:0.724 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site