summaryrefslogtreecommitdiff
path: root/sound/core/seq/oss/seq_oss_rw.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-04-12 12:10:14 +0200
committerTakashi Iwai <tiwai@suse.de>2019-04-12 12:51:22 +0200
commit6740ea6776e97274627e3c261469d1c4ba0a0cb5 (patch)
treedc886ed8527bd101e736d296e4d0df4ea02af146 /sound/core/seq/oss/seq_oss_rw.c
parent7c32ae35fbf9cffb7aa3736f44dec10c944ca18e (diff)
ALSA: seq: Simplify snd_seq_kernel_client_enqueue() helper
We have two helpers for queuing a sequencer event from the kernel client, and both are used only from OSS sequencer layer without any hop and atomic set. Let's simplify and unify two helpers into one. No functional change, just a call pattern change. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/seq/oss/seq_oss_rw.c')
-rw-r--r--sound/core/seq/oss/seq_oss_rw.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/sound/core/seq/oss/seq_oss_rw.c b/sound/core/seq/oss/seq_oss_rw.c
index 30886f5fb100..eb1ef12181f3 100644
--- a/sound/core/seq/oss/seq_oss_rw.c
+++ b/sound/core/seq/oss/seq_oss_rw.c
@@ -180,14 +180,11 @@ insert_queue(struct seq_oss_devinfo *dp, union evrec *rec, struct file *opt)
return 0; /* invalid event - no need to insert queue */
event.time.tick = snd_seq_oss_timer_cur_tick(dp->timer);
- if (dp->timer->realtime || !dp->timer->running) {
+ if (dp->timer->realtime || !dp->timer->running)
snd_seq_oss_dispatch(dp, &event, 0, 0);
- } else {
- if (is_nonblock_mode(dp->file_mode))
- rc = snd_seq_kernel_client_enqueue(dp->cseq, &event, 0, 0);
- else
- rc = snd_seq_kernel_client_enqueue_blocking(dp->cseq, &event, opt, 0, 0);
- }
+ else
+ rc = snd_seq_kernel_client_enqueue(dp->cseq, &event, opt,
+ !is_nonblock_mode(dp->file_mode));
return rc;
}