usb: chipidea: core: switch over to devm_ioremap_resource
authorFelipe Balbi <balbi@ti.com>
Sat, 30 Mar 2013 00:46:27 +0000 (02:46 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 30 Mar 2013 03:53:06 +0000 (20:53 -0700)
switch over to the newly added devm_ioremap_resource
which provides more consistent error messages.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/chipidea/core.c

index 77963b62c496878c8f0832063e19bfd68ae17ab9..42f224936a8eea6c30c3da7eb361c25f049f4b0e 100644 (file)
@@ -407,11 +407,9 @@ static int ci_hdrc_probe(struct platform_device *pdev)
                return -ENODEV;
        }
 
-       base = devm_request_and_ioremap(dev, res);
-       if (!base) {
-               dev_err(dev, "can't request and ioremap resource\n");
-               return -ENOMEM;
-       }
+       base = devm_ioremap_resource(dev, res);
+       if (IS_ERR(base))
+               return PTR_ERR(base);
 
        ci = devm_kzalloc(dev, sizeof(*ci), GFP_KERNEL);
        if (!ci) {