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-atmel.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-atmel.c')
-rw-r--r-- | drivers/usb/host/ehci-atmel.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/usb/host/ehci-atmel.c b/drivers/usb/host/ehci-atmel.c index 27639487f7ac..f3beac4d06b8 100644 --- a/drivers/usb/host/ehci-atmel.c +++ b/drivers/usb/host/ehci-atmel.c | |||
@@ -143,10 +143,9 @@ static int ehci_atmel_drv_probe(struct platform_device *pdev) | |||
143 | hcd->rsrc_start = res->start; | 143 | hcd->rsrc_start = res->start; |
144 | hcd->rsrc_len = resource_size(res); | 144 | hcd->rsrc_len = resource_size(res); |
145 | 145 | ||
146 | hcd->regs = devm_request_and_ioremap(&pdev->dev, res); | 146 | hcd->regs = devm_ioremap_resource(&pdev->dev, res); |
147 | if (hcd->regs == NULL) { | 147 | if (IS_ERR(hcd->regs)) { |
148 | dev_dbg(&pdev->dev, "error mapping memory\n"); | 148 | retval = PTR_ERR(hcd->regs); |
149 | retval = -EFAULT; | ||
150 | goto fail_request_resource; | 149 | goto fail_request_resource; |
151 | } | 150 | } |
152 | 151 | ||