[alsa-devel] [PATCH v6 10/10] soundwire: Fix acquiring bus lock twice during master release
Sanyog Kale
sanyog.r.kale at intel.com
Mon Jul 16 20:47:13 CEST 2018
As part of sdw_stream_remove_master(), sdw_stream_remove_slave() is called
which ends up acquiring bus lock twice.
So, fix it by performing Slave remove operations in
sdw_release_master_stream().
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart at linux.intel.com>
Signed-off-by: Shreyas NC <shreyas.nc at intel.com>
Signed-off-by: Sanyog Kale <sanyog.r.kale at intel.com>
---
drivers/soundwire/stream.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/soundwire/stream.c b/drivers/soundwire/stream.c
index 6d437eb6a2d3..515b2f68bb7d 100644
--- a/drivers/soundwire/stream.c
+++ b/drivers/soundwire/stream.c
@@ -1038,9 +1038,10 @@ static void sdw_release_master_stream(struct sdw_master_runtime *m_rt,
{
struct sdw_slave_runtime *s_rt, *_s_rt;
- list_for_each_entry_safe(s_rt, _s_rt,
- &m_rt->slave_rt_list, m_rt_node)
- sdw_stream_remove_slave(s_rt->slave, stream);
+ list_for_each_entry_safe(s_rt, _s_rt, &m_rt->slave_rt_list, m_rt_node) {
+ sdw_slave_port_release(s_rt->slave->bus, s_rt->slave, stream);
+ sdw_release_slave_stream(s_rt->slave, stream);
+ }
list_del(&m_rt->stream_node);
list_del(&m_rt->bus_node);
--
2.13.0
More information about the Alsa-devel
mailing list