msm: bam_dmux: Add locking around platform device calls
The channel state is used to determine if a platform device has been
registered on a particular channel. In the case of a subsystem restart
while a channel is being opened, the subsystem restart can occur between
the channel state being set to opened and the platform device being
added. This will result in the subsystem restart code seeing that the
channel is open and attempting to remove a platform device that has been
added.
This change adds mutex protection around the channel state updates and
the platform device add/remove calls to handle any race conditions.
CRs-Fixed: 378060
Change-Id: I0838af6c142b3c771d711f48843e4fdbea210f22
Signed-off-by:
Eric Holmberg <eholmber@codeaurora.org>
Loading
Please register or sign in to comment