summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSanyog Kale <sanyog.r.kale@intel.com>2018-07-27 11:14:10 +0200
committerVinod Koul <vkoul@kernel.org>2018-08-27 06:19:48 +0200
commit8d6ccf5cebbc7ed1dee9986e36853a78dfb64084 (patch)
tree2ccbc48cf0de456a43ebd8d944ec6cb765ba008b
parentsoundwire: Fix incorrect exit after configuring stream (diff)
downloadlinux-8d6ccf5cebbc7ed1dee9986e36853a78dfb64084.tar.xz
linux-8d6ccf5cebbc7ed1dee9986e36853a78dfb64084.zip
soundwire: Fix acquiring bus lock twice during master release
As part of sdw_stream_remove_master(), sdw_stream_remove_slave() is called which results in bus lock being acquired twice. So, fix it by performing specific Slave remove operations in sdw_release_master_stream() instead of calling sdw_stream_remove_slave(). Signed-off-by: Sanyog Kale <sanyog.r.kale@intel.com> Signed-off-by: Shreyas NC <shreyas.nc@intel.com> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Vinod Koul <vkoul@kernel.org>
-rw-r--r--drivers/soundwire/stream.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/soundwire/stream.c b/drivers/soundwire/stream.c
index b2682272503e..e5c7e1ef6318 100644
--- a/drivers/soundwire/stream.c
+++ b/drivers/soundwire/stream.c
@@ -899,9 +899,10 @@ static void sdw_release_master_stream(struct sdw_stream_runtime *stream)
struct sdw_master_runtime *m_rt = stream->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->bus_node);
}