diff options
Diffstat (limited to 'sound/core/seq/oss/seq_oss_readq.c')
-rw-r--r-- | sound/core/seq/oss/seq_oss_readq.c | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/sound/core/seq/oss/seq_oss_readq.c b/sound/core/seq/oss/seq_oss_readq.c index 55571e15cd3..f5de79f29f1 100644 --- a/sound/core/seq/oss/seq_oss_readq.c +++ b/sound/core/seq/oss/seq_oss_readq.c @@ -41,17 +41,17 @@ /* * create a read queue */ -seq_oss_readq_t * -snd_seq_oss_readq_new(seq_oss_devinfo_t *dp, int maxlen) +struct seq_oss_readq * +snd_seq_oss_readq_new(struct seq_oss_devinfo *dp, int maxlen) { - seq_oss_readq_t *q; + struct seq_oss_readq *q; if ((q = kzalloc(sizeof(*q), GFP_KERNEL)) == NULL) { snd_printk(KERN_ERR "can't malloc read queue\n"); return NULL; } - if ((q->q = kcalloc(maxlen, sizeof(evrec_t), GFP_KERNEL)) == NULL) { + if ((q->q = kcalloc(maxlen, sizeof(union evrec), GFP_KERNEL)) == NULL) { snd_printk(KERN_ERR "can't malloc read queue buffer\n"); kfree(q); return NULL; @@ -72,7 +72,7 @@ snd_seq_oss_readq_new(seq_oss_devinfo_t *dp, int maxlen) * delete the read queue */ void -snd_seq_oss_readq_delete(seq_oss_readq_t *q) +snd_seq_oss_readq_delete(struct seq_oss_readq *q) { if (q) { kfree(q->q); @@ -84,7 +84,7 @@ snd_seq_oss_readq_delete(seq_oss_readq_t *q) * reset the read queue */ void -snd_seq_oss_readq_clear(seq_oss_readq_t *q) +snd_seq_oss_readq_clear(struct seq_oss_readq *q) { if (q->qlen) { q->qlen = 0; @@ -100,9 +100,9 @@ snd_seq_oss_readq_clear(seq_oss_readq_t *q) * put a midi byte */ int -snd_seq_oss_readq_puts(seq_oss_readq_t *q, int dev, unsigned char *data, int len) +snd_seq_oss_readq_puts(struct seq_oss_readq *q, int dev, unsigned char *data, int len) { - evrec_t rec; + union evrec rec; int result; memset(&rec, 0, sizeof(rec)); @@ -123,7 +123,7 @@ snd_seq_oss_readq_puts(seq_oss_readq_t *q, int dev, unsigned char *data, int len * return zero if enqueued */ int -snd_seq_oss_readq_put_event(seq_oss_readq_t *q, evrec_t *ev) +snd_seq_oss_readq_put_event(struct seq_oss_readq *q, union evrec *ev) { unsigned long flags; @@ -152,7 +152,7 @@ snd_seq_oss_readq_put_event(seq_oss_readq_t *q, evrec_t *ev) * caller must hold lock */ int -snd_seq_oss_readq_pick(seq_oss_readq_t *q, evrec_t *rec) +snd_seq_oss_readq_pick(struct seq_oss_readq *q, union evrec *rec) { if (q->qlen == 0) return -EAGAIN; @@ -164,7 +164,7 @@ snd_seq_oss_readq_pick(seq_oss_readq_t *q, evrec_t *rec) * sleep until ready */ void -snd_seq_oss_readq_wait(seq_oss_readq_t *q) +snd_seq_oss_readq_wait(struct seq_oss_readq *q) { wait_event_interruptible_timeout(q->midi_sleep, (q->qlen > 0 || q->head == q->tail), @@ -176,7 +176,7 @@ snd_seq_oss_readq_wait(seq_oss_readq_t *q) * caller must hold lock */ void -snd_seq_oss_readq_free(seq_oss_readq_t *q) +snd_seq_oss_readq_free(struct seq_oss_readq *q) { if (q->qlen > 0) { q->head = (q->head + 1) % q->maxlen; @@ -189,7 +189,7 @@ snd_seq_oss_readq_free(seq_oss_readq_t *q) * return non-zero if readq is not empty. */ unsigned int -snd_seq_oss_readq_poll(seq_oss_readq_t *q, struct file *file, poll_table *wait) +snd_seq_oss_readq_poll(struct seq_oss_readq *q, struct file *file, poll_table *wait) { poll_wait(file, &q->midi_sleep, wait); return q->qlen; @@ -199,10 +199,10 @@ snd_seq_oss_readq_poll(seq_oss_readq_t *q, struct file *file, poll_table *wait) * put a timestamp */ int -snd_seq_oss_readq_put_timestamp(seq_oss_readq_t *q, unsigned long curt, int seq_mode) +snd_seq_oss_readq_put_timestamp(struct seq_oss_readq *q, unsigned long curt, int seq_mode) { if (curt != q->input_time) { - evrec_t rec; + union evrec rec; memset(&rec, 0, sizeof(rec)); switch (seq_mode) { case SNDRV_SEQ_OSS_MODE_SYNTH: @@ -222,13 +222,15 @@ snd_seq_oss_readq_put_timestamp(seq_oss_readq_t *q, unsigned long curt, int seq_ } +#ifdef CONFIG_PROC_FS /* * proc interface */ void -snd_seq_oss_readq_info_read(seq_oss_readq_t *q, snd_info_buffer_t *buf) +snd_seq_oss_readq_info_read(struct seq_oss_readq *q, struct snd_info_buffer *buf) { snd_iprintf(buf, " read queue [%s] length = %d : tick = %ld\n", (waitqueue_active(&q->midi_sleep) ? "sleeping":"running"), q->qlen, q->input_time); } +#endif /* CONFIG_PROC_FS */ |