summaryrefslogtreecommitdiff
path: root/drivers/usb/host/ehci-vt8500.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/host/ehci-vt8500.c')
-rw-r--r--drivers/usb/host/ehci-vt8500.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/usb/host/ehci-vt8500.c b/drivers/usb/host/ehci-vt8500.c
index 11695d5b9d86..7ecf709610ba 100644
--- a/drivers/usb/host/ehci-vt8500.c
+++ b/drivers/usb/host/ehci-vt8500.c
@@ -16,6 +16,7 @@
*
*/
+#include <linux/err.h>
#include <linux/of.h>
#include <linux/platform_device.h>
@@ -96,10 +97,9 @@ static int vt8500_ehci_drv_probe(struct platform_device *pdev)
hcd->rsrc_start = res->start;
hcd->rsrc_len = resource_size(res);
- hcd->regs = devm_request_and_ioremap(&pdev->dev, res);
- if (!hcd->regs) {
- pr_debug("ioremap failed");
- ret = -ENOMEM;
+ hcd->regs = devm_ioremap_resource(&pdev->dev, res);
+ if (IS_ERR(hcd->regs)) {
+ ret = PTR_ERR(hcd->regs);
goto err1;
}