aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/renesas_usbhs/common.c
diff options
context:
space:
mode:
authorThierry Reding <thierry.reding@avionic-design.de>2013-01-21 05:09:22 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-22 14:41:58 -0500
commit148e11349b0c9c7199fd3096254bd3ea16d59a05 (patch)
tree48fa3e59a152ad95b4e545e1e623c3e442653d53 /drivers/usb/renesas_usbhs/common.c
parenteb612fa013ca07b954300fa46b1499248cedf926 (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/renesas_usbhs/common.c')
-rw-r--r--drivers/usb/renesas_usbhs/common.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/usb/renesas_usbhs/common.c b/drivers/usb/renesas_usbhs/common.c
index 38bce046f4d0..cfd205036aba 100644
--- a/drivers/usb/renesas_usbhs/common.c
+++ b/drivers/usb/renesas_usbhs/common.c
@@ -14,6 +14,7 @@
14 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 14 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
15 * 15 *
16 */ 16 */
17#include <linux/err.h>
17#include <linux/io.h> 18#include <linux/io.h>
18#include <linux/module.h> 19#include <linux/module.h>
19#include <linux/pm_runtime.h> 20#include <linux/pm_runtime.h>
@@ -443,11 +444,9 @@ static int usbhs_probe(struct platform_device *pdev)
443 return -ENOMEM; 444 return -ENOMEM;
444 } 445 }
445 446
446 priv->base = devm_request_and_ioremap(&pdev->dev, res); 447 priv->base = devm_ioremap_resource(&pdev->dev, res);
447 if (!priv->base) { 448 if (IS_ERR(priv->base))
448 dev_err(&pdev->dev, "ioremap error.\n"); 449 return PTR_ERR(priv->base);
449 return -ENOMEM;
450 }
451 450
452 /* 451 /*
453 * care platform info 452 * care platform info