From: Sachin Kamat Date: Mon, 4 Mar 2013 08:35:41 +0000 (+0530) Subject: usb: phy: samsung: Convert to devm_ioremap_resource() X-Git-Tag: v3.9-rc3~17^2~7^2~11 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a40070410329fb704aedf9451732ffb92a3fe39f;p=profile%2Fcommon%2Fkernel-common.git usb: phy: samsung: Convert to devm_ioremap_resource() Use the newly introduced devm_ioremap_resource() instead of devm_request_and_ioremap() 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. Reviewed-by: Thierry Reding Signed-off-by: Sachin Kamat Signed-off-by: Felipe Balbi --- diff --git a/drivers/usb/phy/samsung-usbphy.c b/drivers/usb/phy/samsung-usbphy.c index 6ea5537..967101e 100644 --- a/drivers/usb/phy/samsung-usbphy.c +++ b/drivers/usb/phy/samsung-usbphy.c @@ -787,11 +787,9 @@ static int samsung_usbphy_probe(struct platform_device *pdev) return -ENODEV; } - phy_base = devm_request_and_ioremap(dev, phy_mem); - if (!phy_base) { - dev_err(dev, "%s: register mapping failed\n", __func__); - return -ENXIO; - } + phy_base = devm_ioremap_resource(dev, phy_mem); + if (IS_ERR(phy_base)) + return PTR_ERR(phy_base); sphy = devm_kzalloc(dev, sizeof(*sphy), GFP_KERNEL); if (!sphy)