diff options
author | Thierry Reding <thierry.reding@avionic-design.de> | 2013-01-21 11:09:22 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-22 11:41:58 -0800 |
commit | 148e11349b0c9c7199fd3096254bd3ea16d59a05 (patch) | |
tree | 48fa3e59a152ad95b4e545e1e623c3e442653d53 /drivers/usb/phy/mv_u3d_phy.c | |
parent | eb612fa013ca07b954300fa46b1499248cedf926 (diff) | |
download | linux-148e11349b0c9c7199fd3096254bd3ea16d59a05.tar.bz2 |
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/phy/mv_u3d_phy.c')
-rw-r--r-- | drivers/usb/phy/mv_u3d_phy.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/usb/phy/mv_u3d_phy.c b/drivers/usb/phy/mv_u3d_phy.c index eaddbe3d4304..9d8599122aa9 100644 --- a/drivers/usb/phy/mv_u3d_phy.c +++ b/drivers/usb/phy/mv_u3d_phy.c @@ -283,11 +283,9 @@ static int mv_u3d_phy_probe(struct platform_device *pdev) return -ENODEV; } - phy_base = devm_request_and_ioremap(dev, res); - if (!phy_base) { - dev_err(dev, "%s: register mapping failed\n", __func__); - return -ENXIO; - } + phy_base = devm_ioremap_resource(dev, res); + if (IS_ERR(phy_base)) + return PTR_ERR(phy_base); mv_u3d_phy = devm_kzalloc(dev, sizeof(*mv_u3d_phy), GFP_KERNEL); if (!mv_u3d_phy) |