X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sound%2Fcore%2Fseq%2Fseq_fifo.c;h=6b055aed7a4b232fe6ee7b835b84a7bd6d55aac4;hb=43bc926fffd92024b46cafaf7350d669ba9ca884;hp=3b7647ca7ad9e7a35bdccc2dcdc52e2bfe56cd16;hpb=cee37fe97739d85991964371c1f3a745c00dd236;p=linux-2.6.git diff --git a/sound/core/seq/seq_fifo.c b/sound/core/seq/seq_fifo.c index 3b7647ca7..6b055aed7 100644 --- a/sound/core/seq/seq_fifo.c +++ b/sound/core/seq/seq_fifo.c @@ -29,11 +29,11 @@ /* FIFO */ /* create new fifo */ -fifo_t *snd_seq_fifo_new(int poolsize) +struct snd_seq_fifo *snd_seq_fifo_new(int poolsize) { - fifo_t *f; + struct snd_seq_fifo *f; - f = kcalloc(1, sizeof(*f), GFP_KERNEL); + f = kzalloc(sizeof(*f), GFP_KERNEL); if (f == NULL) { snd_printd("malloc failed for snd_seq_fifo_new() \n"); return NULL; @@ -62,9 +62,9 @@ fifo_t *snd_seq_fifo_new(int poolsize) return f; } -void snd_seq_fifo_delete(fifo_t **fifo) +void snd_seq_fifo_delete(struct snd_seq_fifo **fifo) { - fifo_t *f; + struct snd_seq_fifo *f; snd_assert(fifo != NULL, return); f = *fifo; @@ -88,12 +88,12 @@ void snd_seq_fifo_delete(fifo_t **fifo) kfree(f); } -static snd_seq_event_cell_t *fifo_cell_out(fifo_t *f); +static struct snd_seq_event_cell *fifo_cell_out(struct snd_seq_fifo *f); /* clear queue */ -void snd_seq_fifo_clear(fifo_t *f) +void snd_seq_fifo_clear(struct snd_seq_fifo *f) { - snd_seq_event_cell_t *cell; + struct snd_seq_event_cell *cell; unsigned long flags; /* clear overflow flag */ @@ -110,9 +110,10 @@ void snd_seq_fifo_clear(fifo_t *f) /* enqueue event to fifo */ -int snd_seq_fifo_event_in(fifo_t *f, snd_seq_event_t *event) +int snd_seq_fifo_event_in(struct snd_seq_fifo *f, + struct snd_seq_event *event) { - snd_seq_event_cell_t *cell; + struct snd_seq_event_cell *cell; unsigned long flags; int err; @@ -148,9 +149,9 @@ int snd_seq_fifo_event_in(fifo_t *f, snd_seq_event_t *event) } /* dequeue cell from fifo */ -static snd_seq_event_cell_t *fifo_cell_out(fifo_t *f) +static struct snd_seq_event_cell *fifo_cell_out(struct snd_seq_fifo *f) { - snd_seq_event_cell_t *cell; + struct snd_seq_event_cell *cell; if ((cell = f->head) != NULL) { f->head = cell->next; @@ -167,9 +168,10 @@ static snd_seq_event_cell_t *fifo_cell_out(fifo_t *f) } /* dequeue cell from fifo and copy on user space */ -int snd_seq_fifo_cell_out(fifo_t *f, snd_seq_event_cell_t **cellp, int nonblock) +int snd_seq_fifo_cell_out(struct snd_seq_fifo *f, + struct snd_seq_event_cell **cellp, int nonblock) { - snd_seq_event_cell_t *cell; + struct snd_seq_event_cell *cell; unsigned long flags; wait_queue_t wait; @@ -202,7 +204,8 @@ int snd_seq_fifo_cell_out(fifo_t *f, snd_seq_event_cell_t **cellp, int nonblock) } -void snd_seq_fifo_cell_putback(fifo_t *f, snd_seq_event_cell_t *cell) +void snd_seq_fifo_cell_putback(struct snd_seq_fifo *f, + struct snd_seq_event_cell *cell) { unsigned long flags; @@ -217,18 +220,19 @@ void snd_seq_fifo_cell_putback(fifo_t *f, snd_seq_event_cell_t *cell) /* polling; return non-zero if queue is available */ -int snd_seq_fifo_poll_wait(fifo_t *f, struct file *file, poll_table *wait) +int snd_seq_fifo_poll_wait(struct snd_seq_fifo *f, struct file *file, + poll_table *wait) { poll_wait(file, &f->input_sleep, wait); return (f->cells > 0); } /* change the size of pool; all old events are removed */ -int snd_seq_fifo_resize(fifo_t *f, int poolsize) +int snd_seq_fifo_resize(struct snd_seq_fifo *f, int poolsize) { unsigned long flags; - pool_t *newpool, *oldpool; - snd_seq_event_cell_t *cell, *next, *oldhead; + struct snd_seq_pool *newpool, *oldpool; + struct snd_seq_event_cell *cell, *next, *oldhead; snd_assert(f != NULL && f->pool != NULL, return -EINVAL);