usb/gadget/langwell: do not hold spin_lock when sleep
authorJacob Pan <jacob.jun.pan@linux.intel.com>
Thu, 25 Aug 2011 11:20:33 +0000 (12:20 +0100)
committermgross <mark.gross@intel.com>
Wed, 9 Nov 2011 20:38:17 +0000 (12:38 -0800)
commit4b9ea9f0357a8168df87f5057ef588c5162c23ea
tree1b29afc09192cadb36a8bf0540c9f5b2fd6707bc
parent836dceeca5ce6b43fe17108af1f5c4ce3738371e
usb/gadget/langwell: do not hold spin_lock when sleep

Use GFP_ATOMIC to avoid going to sleep while holding spin_lock.
Fix based on following call trace.
[  443.445677]  [<c102a8e8>] __might_sleep+0xf7/0xff
[  443.445677]  [<c10bca9b>] dma_pool_alloc+0x27/0x2ec
[  443.445677]  [<c12e4346>] ? langwell_ep_queue+0x1eb/0x25a
[  443.445677]  [<c12e4346>] ? langwell_ep_queue+0x1eb/0x25a
[  443.445677]  [<c12e3bd9>] req_to_dtd+0x37/0x10e
[  443.445677]  [<c14d08bd>] ? _raw_spin_lock_irqsave+0x35/0x3e
[  443.445677]  [<c12e4350>] langwell_ep_queue+0x1f5/0x25a

Change-Id: I6f15cf806444caaf8ddef8b899c083445eb24345
Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dirk Brandewie <dirk.brandewie@gmail.com>
drivers/usb/gadget/langwell_udc.c