diff options
| author | isaki <isaki@NetBSD.org> | 2020-02-23 04:02:45 +0000 |
|---|---|---|
| committer | isaki <isaki@NetBSD.org> | 2020-02-23 04:02:45 +0000 |
| commit | 346ca4c0578a860ae61e014ca5a3abfe97ab87fb (patch) | |
| tree | 8b4f8b6d9464c06503f9c895fceac045750c427a /sys/dev/pad | |
| parent | ffb81e7fb248fbf6169db6c91b5643c6d5de79c5 (diff) | |
Make start_input/halt_input optional if the driver has no recording,
make start_output/halt_output optional if the driver has no playback.
And remove such never called functions.
Diffstat (limited to 'sys/dev/pad')
| -rw-r--r-- | sys/dev/pad/pad.c | 34 |
1 files changed, 2 insertions, 32 deletions
diff --git a/sys/dev/pad/pad.c b/sys/dev/pad/pad.c index 0585d12a307..c7bee924b6f 100644 --- a/sys/dev/pad/pad.c +++ b/sys/dev/pad/pad.c @@ -1,4 +1,4 @@ -/* $NetBSD: pad.c,v 1.64 2020/02/22 08:15:09 isaki Exp $ */ +/* $NetBSD: pad.c,v 1.65 2020/02/23 04:02:46 isaki Exp $ */ /*- * Copyright (c) 2007 Jared D. McNeill <jmcneill@invisible.ca> @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pad.c,v 1.64 2020/02/22 08:15:09 isaki Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pad.c,v 1.65 2020/02/23 04:02:46 isaki Exp $"); #include <sys/types.h> #include <sys/param.h> @@ -95,10 +95,7 @@ static int pad_set_format(void *, int, audio_filter_reg_t *, audio_filter_reg_t *); static int pad_start_output(void *, void *, int, void (*)(void *), void *); -static int pad_start_input(void *, void *, int, - void (*)(void *), void *); static int pad_halt_output(void *); -static int pad_halt_input(void *); static int pad_getdev(void *, struct audio_device *); static int pad_set_port(void *, mixer_ctrl_t *); static int pad_get_port(void *, mixer_ctrl_t *); @@ -129,9 +126,7 @@ static const struct audio_hw_if pad_hw_if = { .query_format = pad_query_format, .set_format = pad_set_format, .start_output = pad_start_output, - .start_input = pad_start_input, .halt_output = pad_halt_output, - .halt_input = pad_halt_input, .getdev = pad_getdev, .set_port = pad_set_port, .get_port = pad_get_port, @@ -638,19 +633,6 @@ pad_start_output(void *opaque, void *block, int blksize, } static int -pad_start_input(void *opaque, void *block, int blksize, - void (*intr)(void *), void *intrarg) -{ - struct pad_softc *sc __diagused; - - sc = (struct pad_softc *)opaque; - - KASSERT(mutex_owned(&sc->sc_intr_lock)); - - return EOPNOTSUPP; -} - -static int pad_halt_output(void *opaque) { struct pad_softc *sc; @@ -670,18 +652,6 @@ pad_halt_output(void *opaque) return 0; } -static int -pad_halt_input(void *opaque) -{ - struct pad_softc *sc __diagused; - - sc = (struct pad_softc *)opaque; - - KASSERT(mutex_owned(&sc->sc_intr_lock)); - - return 0; -} - static void pad_done_output(void *arg) { |
