lkml.org 
[lkml]   [2013]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] drivers: dma: Use devm_request_and_ioremap
Date
Use devm_request_and_ioremap function which provides more consistent error
handling.

Signed-off-by: Alexandru Gheorghiu <gheorghiuandru@gmail.com>
---
drivers/dma/txx9dmac.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/dma/txx9dmac.c b/drivers/dma/txx9dmac.c
index 913f55c..471f9f1 100644
--- a/drivers/dma/txx9dmac.c
+++ b/drivers/dma/txx9dmac.c
@@ -1217,11 +1217,7 @@ static int __init txx9dmac_probe(struct platform_device *pdev)
if (!ddev)
return -ENOMEM;

- if (!devm_request_mem_region(&pdev->dev, io->start, resource_size(io),
- dev_name(&pdev->dev)))
- return -EBUSY;
-
- ddev->regs = devm_ioremap(&pdev->dev, io->start, resource_size(io));
+ ddev->regs = devm_request_and_ioremap(&pdev->dev, io);
if (!ddev->regs)
return -ENOMEM;
ddev->have_64bit_regs = pdata->have_64bit_regs;
--
1.7.9.5


\
 
 \ /
  Last update: 2013-04-14 23:41    [W:1.936 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site