usb: Convert to devm_ioremap_resource()
[deliverable/linux.git] / drivers / usb / host / ehci-ppc-of.c
index 45aceefd0c2b500ceb86ebea81369e9fa1fc7561..56dc732bf4511eef13af9af6a7b190df43795edc 100644 (file)
@@ -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;
        }
 
This page took 0.028281 seconds and 5 git commands to generate.