diff options
author | Felipe Balbi <balbi@ti.com> | 2013-07-12 15:34:12 +0300 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2013-07-29 13:56:54 +0300 |
commit | 6c76e6cb48b240ae3062949cf352971b7b03b106 (patch) | |
tree | ca46637bcf14f14affc5b51835f6a7fc2444adda /drivers/usb/dwc3 | |
parent | 8bbcd17d6be41a5c0e4a8562e30c8f15c1ceb836 (diff) | |
download | linux-6c76e6cb48b240ae3062949cf352971b7b03b106.tar.gz linux-6c76e6cb48b240ae3062949cf352971b7b03b106.tar.bz2 linux-6c76e6cb48b240ae3062949cf352971b7b03b106.zip |
usb: dwc3: core: switch over to devm_ioremap_resource()
use the new devm_ioremap_resource() on core.c
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/dwc3')
-rw-r--r-- | drivers/usb/dwc3/core.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index df3723a1023e..25d374c54d73 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -389,23 +389,15 @@ static int dwc3_probe(struct platform_device *pdev) dwc->xhci_resources[0].flags = res->flags; dwc->xhci_resources[0].name = res->name; + res->start += DWC3_GLOBALS_REGS_START; + /* * Request memory region but exclude xHCI regs, * since it will be requested by the xhci-plat driver. */ - res = devm_request_mem_region(dev, res->start + DWC3_GLOBALS_REGS_START, - resource_size(res) - DWC3_GLOBALS_REGS_START, - dev_name(dev)); - if (!res) { - dev_err(dev, "can't request mem region\n"); - return -ENOMEM; - } - - regs = devm_ioremap_nocache(dev, res->start, resource_size(res)); - if (!regs) { - dev_err(dev, "ioremap failed\n"); - return -ENOMEM; - } + regs = devm_ioremap_resource(dev, res); + if (IS_ERR(regs)) + return PTR_ERR(regs); if (node) { dwc->maximum_speed = of_usb_get_maximum_speed(node); |