diff options
author | sos <sos@FreeBSD.org> | 1994-10-27 08:03:15 +0000 |
---|---|---|
committer | sos <sos@FreeBSD.org> | 1994-10-27 08:03:15 +0000 |
commit | 82358e0f07cf25b2a99537d5c75bb71f65aa9b26 (patch) | |
tree | 45c70e9368ef0742a000328fb9f5a7640e67f71c /sys/i386/isa/pcaudio.c | |
parent | a5e94e98c7cdb7f7b8406bf7ada8d90b80a05d84 (diff) | |
download | FreeBSD-src-82358e0f07cf25b2a99537d5c75bb71f65aa9b26.zip FreeBSD-src-82358e0f07cf25b2a99537d5c75bb71f65aa9b26.tar.gz |
Added device registration stuff.
Diffstat (limited to 'sys/i386/isa/pcaudio.c')
-rw-r--r-- | sys/i386/isa/pcaudio.c | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/sys/i386/isa/pcaudio.c b/sys/i386/isa/pcaudio.c index a6bc57f..defd2fb 100644 --- a/sys/i386/isa/pcaudio.c +++ b/sys/i386/isa/pcaudio.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: pcaudio.c,v 1.8 1994/09/29 08:24:43 sos Exp $ + * $Id: pcaudio.c,v 1.9 1994/09/29 21:11:29 sos Exp $ */ #include "pca.h" @@ -37,6 +37,7 @@ #include <sys/ioctl.h> #include <sys/file.h> #include <sys/proc.h> +#include <sys/devconf.h> #include <machine/pcaudioio.h> #include <i386/isa/isa.h> #include <i386/isa/isa_device.h> @@ -211,11 +212,34 @@ pcaprobe(struct isa_device *dvp) } +static struct kern_devconf kdc_pca[NPCA] = { { + 0, 0, 0, /* filled in by dev_attach */ + "pca", 0, { MDDT_ISA, 0, "tty" }, + isa_generic_externalize, 0, 0, ISA_EXTERNALLEN, + &kdc_isa0, /* parent */ + 0, /* parentdata */ + DC_UNKNOWN, /* not supported */ + "PC speaker audio driver" +} }; + + +static inline void +pca_registerdev(struct isa_device *id) +{ + if(id->id_unit) + kdc_pca[id->id_unit] = kdc_pca[0]; + kdc_pca[id->id_unit].kdc_unit = id->id_unit; + kdc_pca[id->id_unit].kdc_isa = id; + dev_attach(&kdc_pca[id->id_unit]); +} + + int pcaattach(struct isa_device *dvp) { - printf(" PCM audio driver\n", dvp->id_unit); + printf(" PC speaker audio driver\n"); pca_init(); + pca_registerdev(dvp); return 1; } |