summaryrefslogtreecommitdiff
path: root/sys/dev/midi.c
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2017-07-19 22:23:55 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2017-07-19 22:23:55 +0000
commit0c3e308d8dead589c04613de329f743bfbf22928 (patch)
treebb263ef7f69ff7229d4d3bf9fd774523d8062f59 /sys/dev/midi.c
parent2e89010fb6ce34420705d0149753c3feecfe8db5 (diff)
Remove SIGIO support. The audio(4) driver doesn't implement it either and
the preferred method to access MIDI hardware is through sndiod(8) which doesn't use it. Fixes a potential issue with a stale struct proc pointer found by Ilja van Sprundel. ok deraadt@, ratchov@
Diffstat (limited to 'sys/dev/midi.c')
-rw-r--r--sys/dev/midi.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/sys/dev/midi.c b/sys/dev/midi.c
index f0179a3d93a..19d7017e955 100644
--- a/sys/dev/midi.c
+++ b/sys/dev/midi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: midi.c,v 1.42 2017/01/03 06:39:44 ratchov Exp $ */
+/* $OpenBSD: midi.c,v 1.43 2017/07/19 22:23:54 kettenis Exp $ */
/*
* Copyright (c) 2003, 2004 Alexandre Ratchov
@@ -97,8 +97,6 @@ midi_iintr(void *addr, int data)
wakeup(&sc->rchan);
}
selwakeup(&sc->rsel);
- if (sc->async)
- psignal(sc->async, SIGIO);
}
}
@@ -206,8 +204,6 @@ midi_out_stop(struct midi_softc *sc)
wakeup(&sc->wchan);
}
selwakeup(&sc->wsel);
- if (sc->async)
- psignal(sc->async, SIGIO);
}
void
@@ -427,20 +423,9 @@ midiioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p)
case FIONBIO:
/* All handled in the upper FS layer */
break;
- case FIOASYNC:
- if (*(int *)addr) {
- if (sc->async) {
- error = EBUSY;
- goto done;
- }
- sc->async = p;
- } else
- sc->async = 0;
- break;
default:
error = ENOTTY;
}
-done:
device_unref(&sc->dev);
return error;
}
@@ -463,7 +448,6 @@ midiopen(dev_t dev, int flags, int mode, struct proc *p)
MIDIBUF_INIT(&sc->outbuf);
sc->isbusy = 0;
sc->rchan = sc->wchan = 0;
- sc->async = 0;
sc->flags = flags;
error = sc->hw_if->open(sc->hw_hdl, flags, midi_iintr, midi_ointr, sc);
if (error)