|
@@ -135,6 +135,7 @@ int snd_seq_fifo_event_in(struct snd_seq_fifo *f,
|
|
f->tail = cell;
|
|
f->tail = cell;
|
|
if (f->head == NULL)
|
|
if (f->head == NULL)
|
|
f->head = cell;
|
|
f->head = cell;
|
|
|
|
+ cell->next = NULL;
|
|
f->cells++;
|
|
f->cells++;
|
|
spin_unlock_irqrestore(&f->lock, flags);
|
|
spin_unlock_irqrestore(&f->lock, flags);
|
|
|
|
|
|
@@ -214,6 +215,8 @@ void snd_seq_fifo_cell_putback(struct snd_seq_fifo *f,
|
|
spin_lock_irqsave(&f->lock, flags);
|
|
spin_lock_irqsave(&f->lock, flags);
|
|
cell->next = f->head;
|
|
cell->next = f->head;
|
|
f->head = cell;
|
|
f->head = cell;
|
|
|
|
+ if (!f->tail)
|
|
|
|
+ f->tail = cell;
|
|
f->cells++;
|
|
f->cells++;
|
|
spin_unlock_irqrestore(&f->lock, flags);
|
|
spin_unlock_irqrestore(&f->lock, flags);
|
|
}
|
|
}
|