@@ -, +, @@ --- sys/dev/sound/isa/gusc.c | 6 ------ sys/dev/sound/isa/sb16.c | 2 -- sys/dev/sound/isa/sbc.c | 6 ------ sys/dev/sound/midi/sequencer.c | 9 --------- sys/dev/sound/pci/als4000.c | 10 ---------- sys/dev/sound/pci/cs4281.c | 12 ------------ sys/dev/sound/pci/csa.c | 6 ------ sys/dev/sound/pci/emu10kx.c | 2 -- sys/dev/sound/pci/envy24.c | 4 ---- sys/dev/sound/pci/envy24ht.c | 4 ---- sys/dev/sound/pci/maestro.c | 10 ---------- sys/dev/sound/pci/vibes.c | 2 -- sys/dev/sound/pcm/dsp.c | 2 -- sys/dev/sound/pcm/mixer.c | 2 -- sys/dev/sound/pcm/sound.c | 6 +----- sys/dev/sound/pcm/sound.h | 7 ------- 16 files changed, 1 insertion(+), 89 deletions(-) --- b/sys/dev/sound/isa/gusc.c +++ b/sys/dev/sound/isa/gusc.c @@ -421,20 +421,16 @@ gusc_release_resource(device_t bus, device_t child, int type, int rid, static int gusc_setup_intr(device_t dev, device_t child, struct resource *irq, int flags, -#if __FreeBSD_version >= 700031 driver_filter_t *filter, -#endif driver_intr_t *intr, void *arg, void **cookiep) { sc_p scp = (sc_p)device_get_softc(dev); devclass_t devclass; -#if __FreeBSD_version >= 700031 if (filter != NULL) { printf("gusc.c: we cannot use a filter here\n"); return (EINVAL); } -#endif devclass = device_get_devclass(child); if (strcmp(devclass_get_name(devclass), "midi") == 0) { scp->midi_intr.intr = intr; @@ -446,9 +442,7 @@ gusc_setup_intr(device_t dev, device_t child, struct resource *irq, int flags, return 0; } return bus_generic_setup_intr(dev, child, irq, flags, -#if __FreeBSD_version >= 700031 filter, -#endif intr, arg, cookiep); } --- b/sys/dev/sound/isa/sb16.c +++ b/sys/dev/sound/isa/sb16.c @@ -176,10 +176,8 @@ sb_dspwr(struct sb_info *sb, u_char val) return 1; } } -#if __FreeBSD_version > 500000 if (curthread->td_intr_nesting_level == 0) printf("sb_dspwr(0x%02x) timed out.\n", val); -#endif return 0; } --- b/sys/dev/sound/isa/sbc.c +++ b/sys/dev/sound/isa/sbc.c @@ -85,9 +85,7 @@ static int sbc_release_resource(device_t bus, device_t child, int type, int rid, struct resource *r); static int sbc_setup_intr(device_t dev, device_t child, struct resource *irq, int flags, -#if __FreeBSD_version >= 700031 driver_filter_t *filter, -#endif driver_intr_t *intr, void *arg, void **cookiep); static int sbc_teardown_intr(device_t dev, device_t child, struct resource *irq, @@ -512,9 +510,7 @@ sbc_intr(void *p) static int sbc_setup_intr(device_t dev, device_t child, struct resource *irq, int flags, -#if __FreeBSD_version >= 700031 driver_filter_t *filter, -#endif driver_intr_t *intr, void *arg, void **cookiep) { @@ -522,12 +518,10 @@ sbc_setup_intr(device_t dev, device_t child, struct resource *irq, int flags, struct sbc_ihl *ihl = NULL; int i, ret; -#if __FreeBSD_version >= 700031 if (filter != NULL) { printf("sbc.c: we cannot use a filter here\n"); return (EINVAL); } -#endif sbc_lock(scp); i = 0; while (i < IRQ_MAX) { --- b/sys/dev/sound/midi/sequencer.c +++ b/sys/dev/sound/midi/sequencer.c @@ -466,12 +466,7 @@ done: cv_broadcast(&scp->th_cv); mtx_unlock(&scp->seq_lock); SEQ_DEBUG(2, printf("seq_eventthread finished\n")); -#if __FreeBSD_version >= 800002 kproc_exit(0); -#else - mtx_lock(&Giant); - kthread_exit(0); -#endif } /* @@ -587,11 +582,7 @@ seq_addunit(void) */ ret = -#if __FreeBSD_version >= 800002 kproc_create -#else - kthread_create -#endif (seq_eventthread, scp, NULL, RFHIGHPID, 0, "sequencer %02d", scp->unit); --- b/sys/dev/sound/pci/als4000.c +++ b/sys/dev/sound/pci/als4000.c @@ -818,22 +818,12 @@ als_pci_attach(device_t dev) * ALS4000 is entirely controlled by the pci powerstate. We * could attempt finer grained control by setting GCR6.31. */ -#if __FreeBSD_version > 500000 if (pci_get_powerstate(dev) != PCI_POWERSTATE_D0) { /* Reset the power state. */ device_printf(dev, "chip is in D%d power mode " "-- setting to D0\n", pci_get_powerstate(dev)); pci_set_powerstate(dev, PCI_POWERSTATE_D0); } -#else - data = pci_read_config(dev, ALS_PCI_POWERREG, 2); - if ((data & 0x03) != 0) { - device_printf(dev, "chip is in D%d power mode " - "-- setting to D0\n", data & 0x03); - data &= ~0x03; - pci_write_config(dev, ALS_PCI_POWERREG, data, 2); - } -#endif if (als_resource_grab(dev, sc)) { device_printf(dev, "failed to allocate resources\n"); --- b/sys/dev/sound/pci/cs4281.c +++ b/sys/dev/sound/pci/cs4281.c @@ -768,7 +768,6 @@ cs4281_pci_attach(device_t dev) pci_enable_busmaster(dev); -#if __FreeBSD_version > 500000 if (pci_get_powerstate(dev) != PCI_POWERSTATE_D0) { /* Reset the power state. */ device_printf(dev, "chip is in D%d power mode " @@ -776,17 +775,6 @@ cs4281_pci_attach(device_t dev) pci_set_powerstate(dev, PCI_POWERSTATE_D0); } -#else - data = pci_read_config(dev, CS4281PCI_PMCS_OFFSET, 4); - if (data & CS4281PCI_PMCS_PS_MASK) { - /* Reset the power state. */ - device_printf(dev, "chip is in D%d power mode " - "-- setting to D0\n", - data & CS4281PCI_PMCS_PS_MASK); - pci_write_config(dev, CS4281PCI_PMCS_OFFSET, - data & ~CS4281PCI_PMCS_PS_MASK, 4); - } -#endif sc->regid = PCIR_BAR(0); sc->regtype = SYS_RES_MEMORY; --- b/sys/dev/sound/pci/csa.c +++ b/sys/dev/sound/pci/csa.c @@ -86,9 +86,7 @@ static int csa_release_resource(device_t bus, device_t child, int type, int rid, struct resource *r); static int csa_setup_intr(device_t bus, device_t child, struct resource *irq, int flags, -#if __FreeBSD_version >= 700031 driver_filter_t *filter, -#endif driver_intr_t *intr, void *arg, void **cookiep); static int csa_teardown_intr(device_t bus, device_t child, struct resource *irq, void *cookie); @@ -450,21 +448,17 @@ csa_release_resource(device_t bus, device_t child, int type, int rid, static int csa_setup_intr(device_t bus, device_t child, struct resource *irq, int flags, -#if __FreeBSD_version >= 700031 driver_filter_t *filter, -#endif driver_intr_t *intr, void *arg, void **cookiep) { sc_p scp; csa_res *resp; struct sndcard_func *func; -#if __FreeBSD_version >= 700031 if (filter != NULL) { printf("ata-csa.c: we cannot use a filter here\n"); return (EINVAL); } -#endif scp = device_get_softc(bus); resp = &scp->res; --- b/sys/dev/sound/pci/emu10kx.c +++ b/sys/dev/sound/pci/emu10kx.c @@ -3203,9 +3203,7 @@ emu_pci_attach(device_t dev) i = 0; sc->irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &i, RF_ACTIVE | RF_SHAREABLE); if ((sc->irq == NULL) || bus_setup_intr(dev, sc->irq, INTR_MPSAFE | INTR_TYPE_AV, -#if __FreeBSD_version >= 700031 NULL, -#endif emu_intr, sc, &sc->ih)) { device_printf(dev, "unable to map interrupt\n"); goto bad; --- b/sys/dev/sound/pci/envy24.c +++ b/sys/dev/sound/pci/envy24.c @@ -2690,11 +2690,7 @@ static device_method_t envy24_methods[] = { static driver_t envy24_driver = { "pcm", envy24_methods, -#if __FreeBSD_version > 500000 PCM_SOFTC_SIZE, -#else - sizeof(struct snddev_info), -#endif }; DRIVER_MODULE(snd_envy24, pci, envy24_driver, pcm_devclass, 0, 0); --- b/sys/dev/sound/pci/envy24ht.c +++ b/sys/dev/sound/pci/envy24ht.c @@ -2588,11 +2588,7 @@ static device_method_t envy24ht_methods[] = { static driver_t envy24ht_driver = { "pcm", envy24ht_methods, -#if __FreeBSD_version > 500000 PCM_SOFTC_SIZE, -#else - sizeof(struct snddev_info), -#endif }; DRIVER_MODULE(snd_envy24ht, pci, envy24ht_driver, pcm_devclass, 0, 0); --- b/sys/dev/sound/pci/maestro.c +++ b/sys/dev/sound/pci/maestro.c @@ -87,12 +87,6 @@ SND_DECLARE_FILE("$FreeBSD$"); #define AGG_DEFAULT_BUFSZ 0x4000 /* 0x1000, but gets underflows */ -/* compatibility */ -#if __FreeBSD_version < 500000 -# define critical_enter() disable_intr() -# define critical_exit() enable_intr() -#endif - #ifndef PCIR_BAR #define PCIR_BAR(x) (PCIR_MAPS + (x) * 4) #endif @@ -1815,9 +1809,7 @@ agg_attach(device_t dev) /*filter*/ NULL, NULL, /*size */ ess->bufsz, 1, 0x3ffff, /*flags */ 0, -#if __FreeBSD_version >= 501102 /*lock */ busdma_lock_mutex, &Giant, -#endif &ess->buf_dmat) != 0) { device_printf(dev, "unable to create dma tag\n"); ret = ENOMEM; @@ -1831,9 +1823,7 @@ agg_attach(device_t dev) /*filter*/ NULL, NULL, /*size */ 3*ess->bufsz, 1, 0x3ffff, /*flags */ 0, -#if __FreeBSD_version >= 501102 /*lock */ busdma_lock_mutex, &Giant, -#endif &ess->stat_dmat) != 0) { device_printf(dev, "unable to create dma tag\n"); ret = ENOMEM; --- b/sys/dev/sound/pci/vibes.c +++ b/sys/dev/sound/pci/vibes.c @@ -730,13 +730,11 @@ sv_attach(device_t dev) { pci_enable_busmaster(dev); -#if __FreeBSD_version > 500000 if (pci_get_powerstate(dev) != PCI_POWERSTATE_D0) { device_printf(dev, "chip is in D%d power mode " "-- setting to D0\n", pci_get_powerstate(dev)); pci_set_powerstate(dev, PCI_POWERSTATE_D0); } -#endif sc->enh_rid = SV_PCI_ENHANCED; sc->enh_type = SYS_RES_IOPORT; sc->enh_reg = bus_alloc_resource(dev, sc->enh_type, --- b/sys/dev/sound/pcm/dsp.c +++ b/sys/dev/sound/pcm/dsp.c @@ -2324,9 +2324,7 @@ dsp_stdclone(char *name, char *namep, char *sep, int use_sep, int *u, int *c) static void dsp_clone(void *arg, -#if __FreeBSD_version >= 600034 struct ucred *cred, -#endif char *name, int namelen, struct cdev **dev) { struct snddev_info *d; --- b/sys/dev/sound/pcm/mixer.c +++ b/sys/dev/sound/pcm/mixer.c @@ -1328,9 +1328,7 @@ done: static void mixer_clone(void *arg, -#if __FreeBSD_version >= 600034 struct ucred *cred, -#endif char *name, int namelen, struct cdev **dev) { struct snddev_info *d; --- b/sys/dev/sound/pcm/sound.c +++ b/sys/dev/sound/pcm/sound.c @@ -124,11 +124,7 @@ snd_setup_intr(device_t dev, struct resource *res, int flags, driver_intr_t hand if (d != NULL && (flags & INTR_MPSAFE)) d->flags |= SD_F_MPSAFE; - return bus_setup_intr(dev, res, flags, -#if __FreeBSD_version >= 700031 - NULL, -#endif - hand, param, cookiep); + return bus_setup_intr(dev, res, flags, hand, param, cookiep); } static void --- b/sys/dev/sound/pcm/sound.h +++ b/sys/dev/sound/pcm/sound.h @@ -53,9 +53,6 @@ #include #include #include -#if __FreeBSD_version < 500000 -#include -#endif #include #include #include @@ -120,11 +117,7 @@ struct snd_mixer; #define PCMCHAN(x) (snd_unit2c(dev2unit(x))) /* XXX unit2minor compat */ -#if __FreeBSD_version >= 800062 #define PCMMINOR(x) (x) -#else -#define PCMMINOR(x) unit2minor(x) -#endif /* * By design, limit possible channels for each direction. --