Commit 2a7b57bd authored by Alan Stern's avatar Alan Stern Committed by Greg Kroah-Hartman

[PATCH] USB: Support system suspend in File-Storage Gadget

This patch adds support for system-wide suspend to the File-Storage
Gadget.  Please apply.
Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent cf8b58a5
......@@ -234,6 +234,7 @@
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/string.h>
#include <linux/suspend.h>
#include <linux/uts.h>
#include <linux/version.h>
#include <linux/wait.h>
......@@ -1540,6 +1541,8 @@ static int sleep_thread(struct fsg_dev *fsg)
rc = wait_event_interruptible(fsg->thread_wqh,
fsg->thread_wakeup_needed);
fsg->thread_wakeup_needed = 0;
if (current->flags & PF_FREEZE)
refrigerator(PF_FREEZE);
return (rc ? -EINTR : 0);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment