diff options
author | Thierry Reding <thierry.reding@avionic-design.de> | 2013-01-21 05:09:14 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-22 14:41:57 -0500 |
commit | 9e0c1fb29a7c257a31c321c2437617b6b4d66168 (patch) | |
tree | ee0b93ff33eb3156339a1e72411c8bbad0c8c415 /drivers/pinctrl/pinctrl-xway.c | |
parent | 1684789f86cbd6a1aff82970992c711898b19995 (diff) |
pinctrl: 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: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/pinctrl/pinctrl-xway.c')
-rw-r--r-- | drivers/pinctrl/pinctrl-xway.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/pinctrl/pinctrl-xway.c b/drivers/pinctrl/pinctrl-xway.c index 5f0eb04c2336..ae8f3a02ed97 100644 --- a/drivers/pinctrl/pinctrl-xway.c +++ b/drivers/pinctrl/pinctrl-xway.c | |||
@@ -9,6 +9,7 @@ | |||
9 | * Copyright (C) 2012 John Crispin <blogic@openwrt.org> | 9 | * Copyright (C) 2012 John Crispin <blogic@openwrt.org> |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/err.h> | ||
12 | #include <linux/slab.h> | 13 | #include <linux/slab.h> |
13 | #include <linux/module.h> | 14 | #include <linux/module.h> |
14 | #include <linux/of_platform.h> | 15 | #include <linux/of_platform.h> |
@@ -687,11 +688,9 @@ static int pinmux_xway_probe(struct platform_device *pdev) | |||
687 | dev_err(&pdev->dev, "Failed to get resource\n"); | 688 | dev_err(&pdev->dev, "Failed to get resource\n"); |
688 | return -ENOENT; | 689 | return -ENOENT; |
689 | } | 690 | } |
690 | xway_info.membase[0] = devm_request_and_ioremap(&pdev->dev, res); | 691 | xway_info.membase[0] = devm_ioremap_resource(&pdev->dev, res); |
691 | if (!xway_info.membase[0]) { | 692 | if (IS_ERR(xway_info.membase[0])) |
692 | dev_err(&pdev->dev, "Failed to remap resource\n"); | 693 | return PTR_ERR(xway_info.membase[0]); |
693 | return -ENOMEM; | ||
694 | } | ||
695 | 694 | ||
696 | match = of_match_device(xway_match, &pdev->dev); | 695 | match = of_match_device(xway_match, &pdev->dev); |
697 | if (match) | 696 | if (match) |