diff options
author | Thierry Reding <thierry.reding@avionic-design.de> | 2013-01-21 05:09:22 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-22 14:41:58 -0500 |
commit | 148e11349b0c9c7199fd3096254bd3ea16d59a05 (patch) | |
tree | 48fa3e59a152ad95b4e545e1e623c3e442653d53 /drivers/usb/host/ehci-platform.c | |
parent | eb612fa013ca07b954300fa46b1499248cedf926 (diff) |
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-platform.c')
-rw-r--r-- | drivers/usb/host/ehci-platform.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/usb/host/ehci-platform.c b/drivers/usb/host/ehci-platform.c index 58fa0c90c7c7..ca7506390542 100644 --- a/drivers/usb/host/ehci-platform.c +++ b/drivers/usb/host/ehci-platform.c | |||
@@ -18,6 +18,7 @@ | |||
18 | * | 18 | * |
19 | * Licensed under the GNU/GPL. See COPYING for details. | 19 | * Licensed under the GNU/GPL. See COPYING for details. |
20 | */ | 20 | */ |
21 | #include <linux/err.h> | ||
21 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
22 | #include <linux/hrtimer.h> | 23 | #include <linux/hrtimer.h> |
23 | #include <linux/io.h> | 24 | #include <linux/io.h> |
@@ -104,9 +105,9 @@ static int ehci_platform_probe(struct platform_device *dev) | |||
104 | hcd->rsrc_start = res_mem->start; | 105 | hcd->rsrc_start = res_mem->start; |
105 | hcd->rsrc_len = resource_size(res_mem); | 106 | hcd->rsrc_len = resource_size(res_mem); |
106 | 107 | ||
107 | hcd->regs = devm_request_and_ioremap(&dev->dev, res_mem); | 108 | hcd->regs = devm_ioremap_resource(&dev->dev, res_mem); |
108 | if (!hcd->regs) { | 109 | if (IS_ERR(hcd->regs)) { |
109 | err = -ENOMEM; | 110 | err = PTR_ERR(hcd->regs); |
110 | goto err_put_hcd; | 111 | goto err_put_hcd; |
111 | } | 112 | } |
112 | err = usb_add_hcd(hcd, irq, IRQF_SHARED); | 113 | err = usb_add_hcd(hcd, irq, IRQF_SHARED); |