From: Johan Hovold Date: Thu, 3 Dec 2015 16:29:00 +0000 (+0100) Subject: greybus: svc: flush workqueue at connection exit X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1cacb456fd6b5fd99f0274bef2b2d04b5f259392;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 --- 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;