USB: gadget/printer, fix sleep inside atomic
authorJiri Slaby <jslaby@suse.cz>
Mon, 21 Jun 2010 15:02:40 +0000 (17:02 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 30 Jun 2010 15:16:06 +0000 (08:16 -0700)
commit10ca4425714a6115c5d865718d64874a1e1ea09a
treeeac8a90e3b0b9436efe5c969510b22d2cdb657b5
parent1c815577823951ff082fe1201fdd5efec5e6e8ea
USB: gadget/printer, fix sleep inside atomic

Stanse found that sleep is called inside atomic context created by
lock_printer_io spinlock in several functions. It's used in process
context only and some functions sleep inside its critical section. As
this is not allowed for spinlocks, switch it to mutex.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Craig W. Nadler <craig@nadler.us>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/gadget/printer.c