sound/seq_oss*: remove snd_seq_oss_readq_wait()
Subsystems (2)
PATCH 14/20 sound/seq_oss*: remove snd_seq_oss_readq_wait()
Hello,
Please consider applying.
Description: Remove snd_seq_oss_readq_wait() which is called only once and is simply a wrapper for a deprecated function. Remove snd_seq_oss_readq_wait()'s prototype from the header file. Replace the one caller with direct wait-queue usage. Patch is compile-tested.
Signed-off-by Nishanth Aravamudan <[email protected]>
sound/core/seq/oss/seq_oss_readq.h +0 -1
@@ -47,7 +47,6 @@ int snd_seq_oss_readq_puts(seq_oss_readqint snd_seq_oss_readq_put_event (seq_oss_readq_t *readq,evrec_t *ev);int snd_seq_oss_readq_put_timestamp (seq_oss_readq_t *readq,unsigned long curt,int seq_mode);int snd_seq_oss_readq_pick (seq_oss_readq_t *q,evrec_t *rec); -void snd_seq_oss_readq_wait (seq_oss_readq_t *q);void snd_seq_oss_readq_free (seq_oss_readq_t *q);#define snd_seq_oss_readq_lock (q, flags) spin_lock_irqsave(&(q)->lock, flags)
sound/core/seq/oss/seq_oss_readq.c +0 -9
@@ -160,15 +160,6 @@ snd_seq_oss_readq_pick(seq_oss_readq_t * }/* -* sleep until ready -*/ -void -snd_seq_oss_readq_wait (seq_oss_readq_t *q) -{ -interruptible_sleep_on_timeout (&q->midi_sleep, q->pre_event_timeout); -} - -/* * drain one record * caller must hold lock */
sound/core/seq/oss/seq_oss_rw.c +5 -1
@@ -28,6 +28,7 @@#include "seq_oss_event.h" #include "seq_oss_timer.h" #include "../seq_clientmgr.h" +#include <linux/wait.h> /*
@@ -43,6 +44,7 @@ static int insert_queue(seq_oss_devinfo_int snd_seq_oss_read (seq_oss_devinfo_t *dp,char __user *buf,int count) { +DEFINE_WAIT (wait);seq_oss_readq_t *readq = dp->readq;int result =0 , err =0 ;int ev_len;
@@ -58,7 +60,9 @@ snd_seq_oss_read(seq_oss_devinfo_t *dp,if (err == -EAGAIN && !is_nonblock_mode (dp->file_mode) && result ==0 ) {snd_seq_oss_readq_unlock (readq, flags); -snd_seq_oss_readq_wait (readq); +prepare_to_wait (&readq->midi_sleep, &wait,TASK_INTERRUPTIBLE ); +schedule_timeout (readq->pre_event_timeout); +finish_wait (&readq->midi_sleep, &wait);snd_seq_oss_readq_lock (readq, flags);if (signal_pending (current)) err = -ERESTARTSYS ;
_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors