In the normal case, the host lock can be claimed directly.
When it cannot, the caller will sleep. Make sure we don't
have any latent bugs by always calling might_sleep().
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
DECLARE_WAITQUEUE(wait, current);
unsigned long flags;
DECLARE_WAITQUEUE(wait, current);
unsigned long flags;
add_wait_queue(&host->wq, &wait);
spin_lock_irqsave(&host->lock, flags);
while (1) {
add_wait_queue(&host->wq, &wait);
spin_lock_irqsave(&host->lock, flags);
while (1) {