X-Git-Url: https://git.stricted.de/?a=blobdiff_plain;f=sound%2Fcore%2Fseq%2Fseq_memory.c;h=fbe8d947c5bbd8274cfd50812ec78b39e5cb2c52;hb=28567fb4bc02fc0fdb7fd328cddfcd623f5dc65c;hp=f478f770bf5213f11663bad4041ad256664e6fe6;hpb=287b901dcadd7eb3c5aa93b679bbad4058814921;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git diff --git a/sound/core/seq/seq_memory.c b/sound/core/seq/seq_memory.c index f478f770bf52..fbe8d947c5bb 100644 --- a/sound/core/seq/seq_memory.c +++ b/sound/core/seq/seq_memory.c @@ -416,7 +416,6 @@ int snd_seq_pool_done(struct snd_seq_pool *pool) { unsigned long flags; struct snd_seq_event_cell *ptr; - int max_count = 5 * HZ; if (snd_BUG_ON(!pool)) return -EINVAL; @@ -429,14 +428,8 @@ int snd_seq_pool_done(struct snd_seq_pool *pool) if (waitqueue_active(&pool->output_sleep)) wake_up(&pool->output_sleep); - while (atomic_read(&pool->counter) > 0) { - if (max_count == 0) { - snd_printk(KERN_WARNING "snd_seq_pool_done timeout: %d cells remain\n", atomic_read(&pool->counter)); - break; - } + while (atomic_read(&pool->counter) > 0) schedule_timeout_uninterruptible(1); - max_count--; - } /* release all resources */ spin_lock_irqsave(&pool->lock, flags);