patch-2.4.0-test11 linux/drivers/sound/cmpci.c
Next file: linux/drivers/sound/cs4232.c
Previous file: linux/drivers/sound/awe_wave.c
Back to the patch index
Back to the overall index
- Lines: 75
- Date:
Thu Nov 16 12:51:28 2000
- Orig file:
v2.4.0-test10/linux/drivers/sound/cmpci.c
- Orig date:
Sun Oct 8 10:50:26 2000
diff -u --recursive --new-file v2.4.0-test10/linux/drivers/sound/cmpci.c linux/drivers/sound/cmpci.c
@@ -983,9 +983,9 @@
}
if (cmd == OSS_GETVERSION)
return put_user(SOUND_VERSION, (int *)arg);
- if (_IOC_TYPE(cmd) != 'M' || _IOC_SIZE(cmd) != sizeof(int))
+ if (_IOC_TYPE(cmd) != 'M' || _SIOC_SIZE(cmd) != sizeof(int))
return -EINVAL;
- if (_IOC_DIR(cmd) == _IOC_READ) {
+ if (_SIOC_DIR(cmd) == _SIOC_READ) {
switch (_IOC_NR(cmd)) {
case SOUND_MIXER_RECSRC: /* Arg contains a bit for each recording source */
return put_user(mixer_recmask(s), (int *)arg);
@@ -1033,7 +1033,7 @@
#endif /* OSS_DOCUMENTED_MIXER_SEMANTICS */
}
}
- if (_IOC_DIR(cmd) != (_IOC_READ|_IOC_WRITE))
+ if (_SIOC_DIR(cmd) != (_SIOC_READ|_SIOC_WRITE))
return -EINVAL;
s->mix.modcnt++;
switch (_IOC_NR(cmd)) {
@@ -1197,9 +1197,9 @@
if (s->dma_dac.mapped || !s->dma_dac.ready)
return 0;
- current->state = TASK_INTERRUPTIBLE;
add_wait_queue(&s->dma_dac.wait, &wait);
for (;;) {
+ set_current_state(TASK_INTERRUPTIBLE);
spin_lock_irqsave(&s->lock, flags);
count = s->dma_dac.count;
spin_unlock_irqrestore(&s->lock, flags);
@@ -1839,6 +1839,7 @@
ret = 0;
add_wait_queue(&s->midi.iwait, &wait);
while (count > 0) {
+ set_current_state(TASK_INTERRUPTIBLE);
spin_lock_irqsave(&s->lock, flags);
ptr = s->midi.ird;
cnt = MIDIINBUF - ptr;
@@ -1854,7 +1855,6 @@
ret = -EAGAIN;
break;
}
- __set_current_state(TASK_INTERRUPTIBLE);
schedule();
if (signal_pending(current))
{
@@ -1903,6 +1903,7 @@
ret = 0;
add_wait_queue(&s->midi.owait, &wait);
while (count > 0) {
+ set_current_state(TASK_INTERRUPTIBLE);
spin_lock_irqsave(&s->lock, flags);
ptr = s->midi.owr;
cnt = MIDIOUTBUF - ptr;
@@ -1919,7 +1920,6 @@
ret = -EAGAIN;
break;
}
- __set_current_state(TASK_INTERRUPTIBLE);
schedule();
if (signal_pending(current)) {
if (!ret)
@@ -2041,9 +2041,9 @@
lock_kernel();
if (file->f_mode & FMODE_WRITE) {
- __set_current_state(TASK_INTERRUPTIBLE);
add_wait_queue(&s->midi.owait, &wait);
for (;;) {
+ set_current_state(TASK_INTERRUPTIBLE);
spin_lock_irqsave(&s->lock, flags);
count = s->midi.ocnt;
spin_unlock_irqrestore(&s->lock, flags);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)