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

Commit dff6ad0a authored by Jack Pham's avatar Jack Pham
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>
parent 41ea0e89
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment