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>
This commit is contained in:
parent
8bbcd17d6b
commit
6c76e6cb48
@ -389,23 +389,15 @@ static int dwc3_probe(struct platform_device *pdev)
|
|||||||
dwc->xhci_resources[0].flags = res->flags;
|
dwc->xhci_resources[0].flags = res->flags;
|
||||||
dwc->xhci_resources[0].name = res->name;
|
dwc->xhci_resources[0].name = res->name;
|
||||||
|
|
||||||
|
res->start += DWC3_GLOBALS_REGS_START;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Request memory region but exclude xHCI regs,
|
* Request memory region but exclude xHCI regs,
|
||||||
* since it will be requested by the xhci-plat driver.
|
* since it will be requested by the xhci-plat driver.
|
||||||
*/
|
*/
|
||||||
res = devm_request_mem_region(dev, res->start + DWC3_GLOBALS_REGS_START,
|
regs = devm_ioremap_resource(dev, res);
|
||||||
resource_size(res) - DWC3_GLOBALS_REGS_START,
|
if (IS_ERR(regs))
|
||||||
dev_name(dev));
|
return PTR_ERR(regs);
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (node) {
|
if (node) {
|
||||||
dwc->maximum_speed = of_usb_get_maximum_speed(node);
|
dwc->maximum_speed = of_usb_get_maximum_speed(node);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user