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

Skip to content
Commit 96262f42 authored by Mayank Rana's avatar Mayank Rana
Browse files

usb_bam: Move check for pipe_enabled_per_bam from consumer disconnect



Current code assume that USB IPA BAM2BAM functionality would be used
in pair i.e having producer and consumer. For feature like DPL which
doesn't have bidirectional communication need with IPA, it would have
only USB BAM as consumer with IPA. Upon disconnection, the
pipes_enabled_per_bam counter is used as a reference counter, and IPA
resources will get cleaned up when it gets decremented to zero.
However, the check to do so happens in usb_bam_disconnect_ipa_cons()
which does not get called if an IPA consumer/USB producer pipe does
not exist for a function, and thus the check is bypassed. Hence move
this check to the end of usb_bam_disconnect_ipa() to ensure this
counter has been decremented the correct number of times before
checking it.

Change-Id: Iea2c2af7566ee790c7929e13505819cdf74b22ab
Signed-off-by: default avatarMayank Rana <mrana@codeaurora.org>
parent d6b29f91
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