Merge branch 'for-2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq
[cascardo/linux.git] / drivers / usb / gadget / u_ether.c
index e3454fe..1eda968 100644 (file)
@@ -839,11 +839,9 @@ void gether_cleanup(void)
                return;
 
        unregister_netdev(the_dev->net);
+       flush_work_sync(&the_dev->work);
        free_netdev(the_dev->net);
 
-       /* assuming we used keventd, it must quiesce too */
-       flush_scheduled_work();
-
        the_dev = NULL;
 }