Commit b01489e0 authored by Jack Pham's avatar Jack Pham Committed by Gerrit - the friendly Code Review server
Browse files

usb: dwc3-msm: Don't use devm_ioremap when ringing GSI DB



Each time gsi_ring_db() is invoked, devm_ioremap_nocache() is
called to map the physical IO address in order to use writel().
However, devm_* calls will allocate a pointer to store with the
struct device and will not get freed until the device or
driver is removed, so in effect causes memory to be slowly
eaten for every GSI doorbell update, such as function bind.

Change the devm_ call to ioremap_nocache() followed by explicit
iounmap(). Also, if ioremap() fails, print an error message
and bail since the writel() would have no chance of succeeding.

Change-Id: I055774c24e2fbe86422756ea34b6a6e34ec21fb6
Signed-off-by: default avatarJack Pham <jackp@codeaurora.org>
Signed-off-by: default avatarPratham Pratap <prathampratap@codeaurora.org>
parent e32cd774
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment