Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1221391

[PATCH v1 7/8] usb: gadget: f_fs: Fix fallout of wait to swait completion change

From Daniel Wagner <daniel.wagner@bmw-carit.de>
Newsgroups linux.kernel
Subject [PATCH v1 7/8] usb: gadget: f_fs: Fix fallout of wait to swait completion change
Date 2015-09-09 14:10 +0200
Message-ID <q6Mmn-2BO-43@gated-at.bofh.it> (permalink)
References <q6Mml-2BO-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


The completion code has been changed using swait (simple wait) instead
of the more complex wait implementation. ffs_data_put() is checking
the internal state of the completion code. That is why the transition
from wait to swait is not completely transparent for this function and
we need to update it accordingly.

Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
Cc: Felipe Balbi <balbi@ti.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Michal Nazarewicz <mina86@mina86.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Robert Baldyga <r.baldyga@samsung.com>
Cc: Rui Miguel Silva <rui.silva@linaro.org>
Cc: David Cohen <david.a.cohen@linux.intel.com>
Cc: linux-usb@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
 drivers/usb/gadget/function/f_fs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/function/f_fs.c b/drivers/usb/gadget/function/f_fs.c
index 6e7be91..4dc32d9 100644
--- a/drivers/usb/gadget/function/f_fs.c
+++ b/drivers/usb/gadget/function/f_fs.c
@@ -1405,7 +1405,7 @@ static void ffs_data_put(struct ffs_data *ffs)
 		pr_info("%s(): freeing\n", __func__);
 		ffs_data_clear(ffs);
 		BUG_ON(waitqueue_active(&ffs->ev.waitq) ||
-		       waitqueue_active(&ffs->ep0req_completion.wait));
+		       swait_active(&ffs->ep0req_completion.wait));
 		kfree(ffs->dev_name);
 		kfree(ffs);
 	}
-- 
2.4.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v0 0/8] Simple wait queue support Daniel Wagner <daniel.wagner@bmw-carit.de> - 2015-09-09 14:10 +0200
  [PATCH v1 8/8] orinoco_usb: Fix fallout of wait to swait completion change Daniel Wagner <daniel.wagner@bmw-carit.de> - 2015-09-09 14:10 +0200
  [PATCH v1 5/8] rcu: Do not call swake_up_all with rnp->lock holding Daniel Wagner <daniel.wagner@bmw-carit.de> - 2015-09-09 14:10 +0200
  [PATCH v1 6/8] gadgetfs: Fix fallout of wait to swait completion change Daniel Wagner <daniel.wagner@bmw-carit.de> - 2015-09-09 14:10 +0200
  [PATCH v1 2/8] KVM: use simple waitqueue for vcpu->wq Daniel Wagner <daniel.wagner@bmw-carit.de> - 2015-09-09 14:10 +0200
  [PATCH v1 3/8] sched/completion: convert completions to use simple wait queues Daniel Wagner <daniel.wagner@bmw-carit.de> - 2015-09-09 14:10 +0200
    Re: [PATCH v1 3/8] sched/completion: convert completions to use  simple wait queues Peter Zijlstra <peterz@infradead.org> - 2015-09-09 16:30 +0200
  [PATCH v1 7/8] usb: gadget: f_fs: Fix fallout of wait to swait completion change Daniel Wagner <daniel.wagner@bmw-carit.de> - 2015-09-09 14:10 +0200
  [PATCH v1 4/8] rcu: use simple wait queues where possible in rcutree Daniel Wagner <daniel.wagner@bmw-carit.de> - 2015-09-09 14:10 +0200
  [PATCH v1 1/8] wait.[ch]: Introduce the simple waitqueue (swait) implementation Daniel Wagner <daniel.wagner@bmw-carit.de> - 2015-09-09 14:10 +0200

csiph-web