]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
soundwire: Initialize completion for defer messages
authorShreyas NC <shreyas.nc@intel.com>
Fri, 27 Jul 2018 09:14:12 +0000 (14:44 +0530)
committerVinod Koul <vkoul@kernel.org>
Mon, 27 Aug 2018 04:19:48 +0000 (09:49 +0530)
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@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>
drivers/soundwire/bus.c

index dcc0ff9f0c224e93d88a05aa933b293c4390d559..dbabd5e69343fa65273fdc17d2ccee5656e6258a 100644 (file)
@@ -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);