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 <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
Johan Hovold 2015-12-03 17:29:00 +01:00 committed by Greg Kroah-Hartman
parent 8e1d6c336d
commit 1cacb456fd
1 changed files with 2 additions and 0 deletions

View File

@ -709,6 +709,8 @@ static void gb_svc_connection_exit(struct gb_connection *connection)
if (device_is_registered(&svc->dev)) if (device_is_registered(&svc->dev))
device_del(&svc->dev); device_del(&svc->dev);
flush_workqueue(svc->wq);
connection->hd->svc = NULL; connection->hd->svc = NULL;
connection->private = NULL; connection->private = NULL;