No empty .Rs/.Re
[netbsd-mini2440.git] / sys / dev / isa / joy_ess.c
blobf93959de2f2efb8f2ae5797b4899de1efa6f1be6
1 /* $NetBSD: joy_ess.c,v 1.4 2007/12/11 11:56:46 lukem Exp $ */
3 #include <sys/cdefs.h>
4 __KERNEL_RCSID(0, "$NetBSD: joy_ess.c,v 1.4 2007/12/11 11:56:46 lukem Exp $");
6 #include <sys/param.h>
7 #include <sys/systm.h>
8 #include <sys/kernel.h>
9 #include <sys/device.h>
10 #include <sys/audioio.h>
11 #include <dev/audio_if.h>
12 #include <sys/bus.h>
14 #include <dev/isa/isavar.h>
15 #include <dev/isa/essvar.h>
16 #include <dev/ic/joyvar.h>
18 static int joy_ess_match(device_t, cfdata_t, void *);
19 static void joy_ess_attach(device_t, device_t, void *);
21 CFATTACH_DECL_NEW(joy_ess, sizeof (struct joy_softc),
22 joy_ess_match, joy_ess_attach, NULL, NULL);
24 static int
25 joy_ess_match(device_t parent, cfdata_t match, void *aux)
27 struct audio_attach_args *aa = aux;
29 if (aa->type != AUDIODEV_TYPE_AUX)
30 return 0;
31 return 1;
34 static void
35 joy_ess_attach(device_t parent, device_t self, void *aux)
37 struct ess_softc *esc = device_private(parent);
38 struct joy_softc *sc = device_private(self);
40 aprint_normal("\n");
42 sc->sc_iot = esc->sc_joy_iot;
43 sc->sc_ioh = esc->sc_joy_ioh;
44 sc->sc_dev = self;
46 joyattach(sc);