usb: dwc3: use local copy of resource to fix-up register offset
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Thu, 19 Apr 2018 11:03:37 +0000 (20:03 +0900)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Tue, 15 May 2018 07:23:47 +0000 (10:23 +0300)
commit44feb8e6ea2d3743d1d90dc5a05dc458dedd71d0
tree199f7c98cdddc9c216515add8dc51dd6d405db3e
parent1ef6c42afc76d2e88a7972e2f59082305d9945bc
usb: dwc3: use local copy of resource to fix-up register offset

It is not a good idea to directly modify the resource of a platform
device.  Modify its local copy, and pass it to devm_ioremap_resource()
so that we do not need to restore it in the failure path and the remove
hook.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/dwc3/core.c