aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-tegra.c
diff options
context:
space:
mode:
authorThierry Reding <thierry.reding@avionic-design.de>2013-01-21 05:09:01 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-22 14:41:56 -0500
commit641d03422a59b1e790b7edabb16bc62da71130c3 (patch)
tree664b32773f331f9d0b60bd0feaae831791c1d3ff /drivers/gpio/gpio-tegra.c
parentc7c9e1c372452688f0ef2af794789bbd00f9fa51 (diff)
gpio: 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: Grant Likely <grant.likely@secretlab.ca> Cc: Linus Walleij <linus.walleij@linaro.org> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Tested-by: Gregory CLEMENT <gregory.clement@free-electrons.com> Acked-by: Gregory CLEMENT <gregory.clement@free-electrons.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/gpio/gpio-tegra.c')
-rw-r--r--drivers/gpio/gpio-tegra.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c
index 63cb643d4b5a..414ad912232f 100644
--- a/drivers/gpio/gpio-tegra.c
+++ b/drivers/gpio/gpio-tegra.c
@@ -17,6 +17,7 @@
17 * 17 *
18 */ 18 */
19 19
20#include <linux/err.h>
20#include <linux/init.h> 21#include <linux/init.h>
21#include <linux/irq.h> 22#include <linux/irq.h>
22#include <linux/interrupt.h> 23#include <linux/interrupt.h>
@@ -450,11 +451,9 @@ static int tegra_gpio_probe(struct platform_device *pdev)
450 return -ENODEV; 451 return -ENODEV;
451 } 452 }
452 453
453 regs = devm_request_and_ioremap(&pdev->dev, res); 454 regs = devm_ioremap_resource(&pdev->dev, res);
454 if (!regs) { 455 if (IS_ERR(regs))
455 dev_err(&pdev->dev, "Couldn't ioremap regs\n"); 456 return PTR_ERR(regs);
456 return -ENODEV;
457 }
458 457
459 for (i = 0; i < tegra_gpio_bank_count; i++) { 458 for (i = 0; i < tegra_gpio_bank_count; i++) {
460 for (j = 0; j < 4; j++) { 459 for (j = 0; j < 4; j++) {