From 1cacb456fd6b5fd99f0274bef2b2d04b5f259392 Mon Sep 17 00:00:00 2001 From: Johan Hovold Date: Thu, 3 Dec 2015 17:29:00 +0100 Subject: [PATCH] greybus: svc: flush workqueue at connection exit Make sure to flush the workqueue from hotplug and hotunplug events when the svc connection is tore down. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman --- drivers/staging/greybus/svc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/greybus/svc.c b/drivers/staging/greybus/svc.c index af41e8e49c31..f65aba6446e2 100644 --- a/drivers/staging/greybus/svc.c +++ b/drivers/staging/greybus/svc.c @@ -709,6 +709,8 @@ static void gb_svc_connection_exit(struct gb_connection *connection) if (device_is_registered(&svc->dev)) device_del(&svc->dev); + flush_workqueue(svc->wq); + connection->hd->svc = NULL; connection->private = NULL; -- 2.20.1