summaryrefslogtreecommitdiff
path: root/drivers/usb/host/ehci-grlib.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/host/ehci-grlib.c')
-rw-r--r--drivers/usb/host/ehci-grlib.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/usb/host/ehci-grlib.c b/drivers/usb/host/ehci-grlib.c
index 1fc89292f5d6..5d75de9729b6 100644
--- a/drivers/usb/host/ehci-grlib.c
+++ b/drivers/usb/host/ehci-grlib.c
@@ -25,7 +25,7 @@
* Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-
+#include <linux/err.h>
#include <linux/signal.h>
#include <linux/of_irq.h>
@@ -118,10 +118,9 @@ static int ehci_hcd_grlib_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;
}