diff options
author | Thierry Reding <thierry.reding@avionic-design.de> | 2013-01-21 05:09:00 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-25 15:21:46 -0500 |
commit | 7331205a9662a730799470fdd9ecbff0ea073606 (patch) | |
tree | b314ae443a4b788456a44237a4fdadf3dd27c25f /drivers/dma/mmp_tdma.c | |
parent | 93316e263a321de6ef268a2a66c322626bd65cf1 (diff) |
dma: Convert to devm_ioremap_resource()
Convert all uses of devm_request_and_ioremap() to the newly introduced
devm_ioremap_resource() which provides more consistent error handling.
devm_ioremap_resource() provides its own error messages so all explicit
error messages can be removed from the failure code paths.
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Cc: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/dma/mmp_tdma.c')
-rw-r--r-- | drivers/dma/mmp_tdma.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/dma/mmp_tdma.c b/drivers/dma/mmp_tdma.c index a9f1cd56689c..43d5a6c33297 100644 --- a/drivers/dma/mmp_tdma.c +++ b/drivers/dma/mmp_tdma.c | |||
@@ -9,6 +9,7 @@ | |||
9 | * | 9 | * |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/err.h> | ||
12 | #include <linux/module.h> | 13 | #include <linux/module.h> |
13 | #include <linux/init.h> | 14 | #include <linux/init.h> |
14 | #include <linux/types.h> | 15 | #include <linux/types.h> |
@@ -547,9 +548,9 @@ static int mmp_tdma_probe(struct platform_device *pdev) | |||
547 | if (!iores) | 548 | if (!iores) |
548 | return -EINVAL; | 549 | return -EINVAL; |
549 | 550 | ||
550 | tdev->base = devm_request_and_ioremap(&pdev->dev, iores); | 551 | tdev->base = devm_ioremap_resource(&pdev->dev, iores); |
551 | if (!tdev->base) | 552 | if (IS_ERR(tdev->base)) |
552 | return -EADDRNOTAVAIL; | 553 | return PTR_ERR(tdev->base); |
553 | 554 | ||
554 | INIT_LIST_HEAD(&tdev->device.channels); | 555 | INIT_LIST_HEAD(&tdev->device.channels); |
555 | 556 | ||