[PATCH 4.19 038/422] soundwire: Initialize completion for defer messages
From: Greg Kroah-Hartman
Date: Tue Nov 19 2019 - 00:24:47 EST
From: Shreyas NC <shreyas.nc@xxxxxxxxx>
[ Upstream commit a306a0e4a5326269b6c78d136407f08433ab5ece ]
Deferred messages are async messages used to synchronize
transitions mostly while doing a bank switch on multi links.
On successful transitions these messages are marked complete
and thereby confirming that all the buses performed bank switch
successfully.
So, initialize the completion structure for the same.
Signed-off-by: Sanyog Kale <sanyog.r.kale@xxxxxxxxx>
Signed-off-by: Shreyas NC <shreyas.nc@xxxxxxxxx>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@xxxxxxxxxxxxxxx>
Signed-off-by: Vinod Koul <vkoul@xxxxxxxxxx>
Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>
---
drivers/soundwire/bus.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c
index 83576810eee65..df172bf3925f6 100644
--- a/drivers/soundwire/bus.c
+++ b/drivers/soundwire/bus.c
@@ -175,6 +175,7 @@ static inline int do_transfer_defer(struct sdw_bus *bus,
defer->msg = msg;
defer->length = msg->len;
+ init_completion(&defer->complete);
for (i = 0; i <= retry; i++) {
resp = bus->ops->xfer_msg_defer(bus, msg, defer);
--
2.20.1