diff options
author | Thierry Reding <thierry.reding@avionic-design.de> | 2013-01-21 05:08:55 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-25 15:21:45 -0500 |
commit | 5857bd98dbd0080e6b27b51087cc9ec24f426e8b (patch) | |
tree | 5527eeca02ac9c36b280ebfb054e090728174003 /arch/arm/mach-omap2 | |
parent | 84dbf809fbae0591d319a7ea76e6032ff434824c (diff) |
ARM: 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.
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Cc: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r-- | arch/arm/mach-omap2/gpmc.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c index 8033cb747c86..64bac53da0e8 100644 --- a/arch/arm/mach-omap2/gpmc.c +++ b/arch/arm/mach-omap2/gpmc.c | |||
@@ -1134,11 +1134,9 @@ static int gpmc_probe(struct platform_device *pdev) | |||
1134 | phys_base = res->start; | 1134 | phys_base = res->start; |
1135 | mem_size = resource_size(res); | 1135 | mem_size = resource_size(res); |
1136 | 1136 | ||
1137 | gpmc_base = devm_request_and_ioremap(&pdev->dev, res); | 1137 | gpmc_base = devm_ioremap_resource(&pdev->dev, res); |
1138 | if (!gpmc_base) { | 1138 | if (IS_ERR(gpmc_base)) |
1139 | dev_err(&pdev->dev, "error: request memory / ioremap\n"); | 1139 | return PTR_ERR(gpmc_base); |
1140 | return -EADDRNOTAVAIL; | ||
1141 | } | ||
1142 | 1140 | ||
1143 | res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); | 1141 | res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); |
1144 | if (res == NULL) | 1142 | if (res == NULL) |