mhi: core: Handle write lock properly in mhi_pm_m0_transition
Take write lock only to protect db_mode member of mhi channel.
This allows rest of the mhi channels to just take read lock which
fine grains the locking. It prevents channel readers to starve if
they try to enter critical section after a writer.
Change-Id: I85ffa9ebb8d7fe4021983204d07f3b438f8dc408
Signed-off-by:
Hemant Kumar <hemantk@codeaurora.org>
Loading
Please register or sign in to comment