diff options
author | Thierry Reding <thierry.reding@avionic-design.de> | 2013-01-21 11:09:22 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-22 11:41:58 -0800 |
commit | 148e11349b0c9c7199fd3096254bd3ea16d59a05 (patch) | |
tree | 48fa3e59a152ad95b4e545e1e623c3e442653d53 /drivers/usb/host/ehci-ppc-of.c | |
parent | eb612fa013ca07b954300fa46b1499248cedf926 (diff) | |
download | blackbird-op-linux-148e11349b0c9c7199fd3096254bd3ea16d59a05.tar.gz blackbird-op-linux-148e11349b0c9c7199fd3096254bd3ea16d59a05.zip |
usb: 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>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/ehci-ppc-of.c')
-rw-r--r-- | drivers/usb/host/ehci-ppc-of.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/usb/host/ehci-ppc-of.c b/drivers/usb/host/ehci-ppc-of.c index 45aceefd0c2b..56dc732bf451 100644 --- a/drivers/usb/host/ehci-ppc-of.c +++ b/drivers/usb/host/ehci-ppc-of.c @@ -12,6 +12,7 @@ * This file is licenced under the GPL. */ +#include <linux/err.h> #include <linux/signal.h> #include <linux/of.h> @@ -121,10 +122,9 @@ static int ehci_hcd_ppc_of_probe(struct platform_device *op) goto err_irq; } - hcd->regs = devm_request_and_ioremap(&op->dev, &res); - if (!hcd->regs) { - pr_err("%s: devm_request_and_ioremap failed\n", __FILE__); - rv = -ENOMEM; + hcd->regs = devm_ioremap_resource(&op->dev, &res); + if (IS_ERR(hcd->regs)) { + rv = PTR_ERR(hcd->regs); goto err_ioremap; } |