Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 95456f28 authored by Hemant Kumar's avatar Hemant Kumar
Browse files

usb: dwc3: Do not update the resource of platform device



commit <44feb8e6> ("usb: dwc3: use local copy of resource to
fix-up register offset") is adding a local variable to cache
local copy of memory resource. Hence there is no need to update
the resource variable and use the local copy of it.

Change-Id: Iad52fc39575cf177b7ee63e9404cc469b8c8cfa3
Signed-off-by: default avatarHemant Kumar <hemantk@codeaurora.org>
parent 16a6b9f6
Loading
Loading
Loading
Loading
+0 −16
Original line number Diff line number Diff line
@@ -1417,8 +1417,6 @@ 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;

	irq = platform_get_irq(to_platform_device(dwc->dev), 0);

	ret = devm_request_irq(dev, irq, dwc3_interrupt, IRQF_SHARED, "dwc3",
@@ -1551,12 +1549,6 @@ static int dwc3_probe(struct platform_device *pdev)
	}
	destroy_workqueue(dwc->dwc_wq);
err0:
	/*
	 * restore res->start back to its original value so that, in case the
	 * probe is deferred, we don't end up getting error in request the
	 * memory region the next time probe is called.
	 */
	res->start -= DWC3_GLOBALS_REGS_START;

	return ret;
}
@@ -1564,14 +1556,6 @@ static int dwc3_probe(struct platform_device *pdev)
static int dwc3_remove(struct platform_device *pdev)
{
	struct dwc3	*dwc = platform_get_drvdata(pdev);
	struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);

	/*
	 * restore res->start back to its original value so that, in case the
	 * probe is deferred, we don't end up getting error in request the
	 * memory region the next time probe is called.
	 */
	res->start -= DWC3_GLOBALS_REGS_START;

	dwc3_debugfs_exit(dwc);
	dwc3_gadget_exit(dwc);