summaryrefslogtreecommitdiffstats
path: root/sys/dev/sound
diff options
context:
space:
mode:
authorbapt <bapt@FreeBSD.org>2014-11-03 11:11:45 +0000
committerbapt <bapt@FreeBSD.org>2014-11-03 11:11:45 +0000
commit786df054edfdb6812985e3208126459d98d69bd8 (patch)
tree233a545798b72106aff9606045c3e5784f46316c /sys/dev/sound
parent5117c55ea6edd7e1702d7adfc1b78cbf1c55d5c6 (diff)
downloadFreeBSD-src-786df054edfdb6812985e3208126459d98d69bd8.zip
FreeBSD-src-786df054edfdb6812985e3208126459d98d69bd8.tar.gz
Remove check for obsolete FreeBSD versions
PR: 194517 Submitted by: François Tigeot <ftigeot@wolfpond.org>
Diffstat (limited to 'sys/dev/sound')
-rw-r--r--sys/dev/sound/isa/gusc.c6
-rw-r--r--sys/dev/sound/isa/sb16.c2
-rw-r--r--sys/dev/sound/isa/sbc.c6
-rw-r--r--sys/dev/sound/midi/sequencer.c9
-rw-r--r--sys/dev/sound/pci/als4000.c10
-rw-r--r--sys/dev/sound/pci/cs4281.c12
-rw-r--r--sys/dev/sound/pci/csa.c6
-rw-r--r--sys/dev/sound/pci/emu10kx.c2
-rw-r--r--sys/dev/sound/pci/envy24.c4
-rw-r--r--sys/dev/sound/pci/envy24ht.c4
-rw-r--r--sys/dev/sound/pci/maestro.c10
-rw-r--r--sys/dev/sound/pci/vibes.c2
-rw-r--r--sys/dev/sound/pcm/dsp.c2
-rw-r--r--sys/dev/sound/pcm/mixer.c2
-rw-r--r--sys/dev/sound/pcm/sound.c6
-rw-r--r--sys/dev/sound/pcm/sound.h7
16 files changed, 1 insertions, 89 deletions
diff --git a/sys/dev/sound/isa/gusc.c b/sys/dev/sound/isa/gusc.c
index 58ac346..a45e7e6 100644
--- a/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);
}
diff --git a/sys/dev/sound/isa/sb16.c b/sys/dev/sound/isa/sb16.c
index 3e3cbc8..536de77 100644
--- a/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;
}
diff --git a/sys/dev/sound/isa/sbc.c b/sys/dev/sound/isa/sbc.c
index aa6003b..6f8f64e 100644
--- a/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) {
diff --git a/sys/dev/sound/midi/sequencer.c b/sys/dev/sound/midi/sequencer.c
index 1ef7845..008d6bd 100644
--- a/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);
diff --git a/sys/dev/sound/pci/als4000.c b/sys/dev/sound/pci/als4000.c
index 0cd51e3..2765660 100644
--- a/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");
diff --git a/sys/dev/sound/pci/cs4281.c b/sys/dev/sound/pci/cs4281.c
index 6e1b17d..7ad6502 100644
--- a/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;
diff --git a/sys/dev/sound/pci/csa.c b/sys/dev/sound/pci/csa.c
index 4a766e7..e406410 100644
--- a/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;
diff --git a/sys/dev/sound/pci/emu10kx.c b/sys/dev/sound/pci/emu10kx.c
index 5309dfb..051a874 100644
--- a/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;
diff --git a/sys/dev/sound/pci/envy24.c b/sys/dev/sound/pci/envy24.c
index 5b39ff8..ce03998 100644
--- a/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);
diff --git a/sys/dev/sound/pci/envy24ht.c b/sys/dev/sound/pci/envy24ht.c
index 0619ac1..7e96be6 100644
--- a/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);
diff --git a/sys/dev/sound/pci/maestro.c b/sys/dev/sound/pci/maestro.c
index c95aa6c..c7cbb35 100644
--- a/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;
diff --git a/sys/dev/sound/pci/vibes.c b/sys/dev/sound/pci/vibes.c
index 733e0d8..f0cb57f 100644
--- a/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,
diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c
index 5195da2..54ad75e 100644
--- a/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;
diff --git a/sys/dev/sound/pcm/mixer.c b/sys/dev/sound/pcm/mixer.c
index 1c53076..c0c8013 100644
--- a/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;
diff --git a/sys/dev/sound/pcm/sound.c b/sys/dev/sound/pcm/sound.c
index 8b43879..72b2bda 100644
--- a/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, NULL, hand, param, cookiep);
}
static void
diff --git a/sys/dev/sound/pcm/sound.h b/sys/dev/sound/pcm/sound.h
index 80cc645..3565ca5 100644
--- a/sys/dev/sound/pcm/sound.h
+++ b/sys/dev/sound/pcm/sound.h
@@ -53,9 +53,6 @@
#include <sys/errno.h>
#include <sys/malloc.h>
#include <sys/bus.h>
-#if __FreeBSD_version < 500000
-#include <sys/buf.h>
-#endif
#include <machine/resource.h>
#include <machine/bus.h>
#include <sys/rman.h>
@@ -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.
OpenPOWER on IntegriCloud