]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
USB: gadget: f_mass_storage: remove needless complete()
authorMichal Nazarewicz <mina86@mina86.com>
Thu, 28 Oct 2010 15:31:22 +0000 (17:31 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 11 Nov 2010 13:58:49 +0000 (05:58 -0800)
This commit removes call to the complete() function done in
fsg_unbind() which was never needed there but was a leftover
form file_storage.c.

Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/gadget/f_mass_storage.c

index c71f69fbf7304e15d3c0439246bf3df5929ee4d7..365f1b3ab155d5c4adeed0f30b000f73dc3c5746 100644 (file)
@@ -2657,7 +2657,7 @@ static int fsg_main_thread(void *common_)
                up_write(&common->filesem);
        }
 
-       /* Let the unbind and cleanup routines know the thread has exited */
+       /* Let fsg_unbind() know the thread has exited */
        complete_and_exit(&common->thread_notifier, 0);
 }
 
@@ -2906,9 +2906,6 @@ static void fsg_common_release(struct kref *ref)
        if (common->state != FSG_STATE_TERMINATED) {
                raise_exception(common, FSG_STATE_EXIT);
                wait_for_completion(&common->thread_notifier);
-
-               /* The cleanup routine waits for this completion also */
-               complete(&common->thread_notifier);
        }
 
        if (likely(common->luns)) {