summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/function/u_fs.h
diff options
context:
space:
mode:
authorJerry Zhang <zhangjerry@google.com>2017-04-18 16:11:48 -0700
committerFelipe Balbi <felipe.balbi@linux.intel.com>2017-06-02 11:22:31 +0300
commite16828cf945ca11b05df1cc755af8e4b669f6dd3 (patch)
tree61a8bfc51b95e826626c2140ac8d6d4ecadfff0b /drivers/usb/gadget/function/u_fs.h
parent222155de45573e978cda988b7efc7d4e7b9a8ff9 (diff)
downloadlinux-e16828cf945ca11b05df1cc755af8e4b669f6dd3.tar.bz2
usb: gadget: function: f_fs: Move epfile waitqueue to ffs_data.
There were individual waitqueues for each epfile but eps_enable would iterate through all of them, resulting in essentially the same wakeup time. The waitqueue represents the function being enabled, so a central waitqueue in ffs_data makes more sense and is less redundant. Also use wake_up_interruptible to reflect use of wait_event_interruptible. Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Jerry Zhang <zhangjerry@google.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/gadget/function/u_fs.h')
-rw-r--r--drivers/usb/gadget/function/u_fs.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/gadget/function/u_fs.h b/drivers/usb/gadget/function/u_fs.h
index 4378cc2fcac3..540f1c48c1a8 100644
--- a/drivers/usb/gadget/function/u_fs.h
+++ b/drivers/usb/gadget/function/u_fs.h
@@ -216,6 +216,9 @@ struct ffs_data {
#define FFS_FL_CALL_CLOSED_CALLBACK 0
#define FFS_FL_BOUND 1
+ /* For waking up blocked threads when function is enabled. */
+ wait_queue_head_t wait;
+
/* Active function */
struct ffs_function *func;