summaryrefslogtreecommitdiffstats
path: root/sys/dev/sound
diff options
context:
space:
mode:
authorjhibbits <jhibbits@FreeBSD.org>2016-02-19 03:37:56 +0000
committerjhibbits <jhibbits@FreeBSD.org>2016-02-19 03:37:56 +0000
commitfbc9874dd0eedf00e9d1c958c8839e995c43ecbd (patch)
treeb91ec9765a2b284626335ef2c2e8df6e16a2c19f /sys/dev/sound
parent4e592305cb4c9a17486ac8884e958a3001479d88 (diff)
downloadFreeBSD-src-fbc9874dd0eedf00e9d1c958c8839e995c43ecbd.zip
FreeBSD-src-fbc9874dd0eedf00e9d1c958c8839e995c43ecbd.tar.gz
Replace several bus_alloc_resource() calls using default arguments with bus_alloc_resource_any()
Since these calls only use default arguments, bus_alloc_resource_any() is the right call. Differential Revision: https://reviews.freebsd.org/D5306
Diffstat (limited to 'sys/dev/sound')
-rw-r--r--sys/dev/sound/pci/envy24.c20
-rw-r--r--sys/dev/sound/pci/envy24ht.c12
-rw-r--r--sys/dev/sound/pci/hdspe.c8
-rw-r--r--sys/dev/sound/pci/vibes.c4
4 files changed, 22 insertions, 22 deletions
diff --git a/sys/dev/sound/pci/envy24.c b/sys/dev/sound/pci/envy24.c
index 427f507..c4eaa10 100644
--- a/sys/dev/sound/pci/envy24.c
+++ b/sys/dev/sound/pci/envy24.c
@@ -2482,17 +2482,17 @@ envy24_alloc_resource(struct sc_info *sc)
{
/* allocate I/O port resource */
sc->csid = PCIR_CCS;
- sc->cs = bus_alloc_resource(sc->dev, SYS_RES_IOPORT,
- &sc->csid, 0, ~0, 1, RF_ACTIVE);
+ sc->cs = bus_alloc_resource_any(sc->dev, SYS_RES_IOPORT,
+ &sc->csid, RF_ACTIVE);
sc->ddmaid = PCIR_DDMA;
- sc->ddma = bus_alloc_resource(sc->dev, SYS_RES_IOPORT,
- &sc->ddmaid, 0, ~0, 1, RF_ACTIVE);
+ sc->ddma = bus_alloc_resource_any(sc->dev, SYS_RES_IOPORT,
+ &sc->ddmaid, RF_ACTIVE);
sc->dsid = PCIR_DS;
- sc->ds = bus_alloc_resource(sc->dev, SYS_RES_IOPORT,
- &sc->dsid, 0, ~0, 1, RF_ACTIVE);
+ sc->ds = bus_alloc_resource_any(sc->dev, SYS_RES_IOPORT,
+ &sc->dsid, RF_ACTIVE);
sc->mtid = PCIR_MT;
- sc->mt = bus_alloc_resource(sc->dev, SYS_RES_IOPORT,
- &sc->mtid, 0, ~0, 1, RF_ACTIVE);
+ sc->mt = bus_alloc_resource_any(sc->dev, SYS_RES_IOPORT,
+ &sc->mtid, RF_ACTIVE);
if (!sc->cs || !sc->ddma || !sc->ds || !sc->mt) {
device_printf(sc->dev, "unable to map IO port space\n");
return ENXIO;
@@ -2516,8 +2516,8 @@ envy24_alloc_resource(struct sc_info *sc)
/* allocate interrupt resource */
sc->irqid = 0;
- sc->irq = bus_alloc_resource(sc->dev, SYS_RES_IRQ, &sc->irqid,
- 0, ~0, 1, RF_ACTIVE | RF_SHAREABLE);
+ sc->irq = bus_alloc_resource_any(sc->dev, SYS_RES_IRQ, &sc->irqid,
+ RF_ACTIVE | RF_SHAREABLE);
if (!sc->irq ||
snd_setup_intr(sc->dev, sc->irq, INTR_MPSAFE, envy24_intr, sc, &sc->ih)) {
device_printf(sc->dev, "unable to map interrupt\n");
diff --git a/sys/dev/sound/pci/envy24ht.c b/sys/dev/sound/pci/envy24ht.c
index efad4b1..85a36c2 100644
--- a/sys/dev/sound/pci/envy24ht.c
+++ b/sys/dev/sound/pci/envy24ht.c
@@ -2400,11 +2400,11 @@ envy24ht_alloc_resource(struct sc_info *sc)
{
/* allocate I/O port resource */
sc->csid = PCIR_CCS;
- sc->cs = bus_alloc_resource(sc->dev, SYS_RES_IOPORT,
- &sc->csid, 0, ~0, 1, RF_ACTIVE);
+ sc->cs = bus_alloc_resource_any(sc->dev, SYS_RES_IOPORT,
+ &sc->csid, RF_ACTIVE);
sc->mtid = ENVY24HT_PCIR_MT;
- sc->mt = bus_alloc_resource(sc->dev, SYS_RES_IOPORT,
- &sc->mtid, 0, ~0, 1, RF_ACTIVE);
+ sc->mt = bus_alloc_resource_any(sc->dev, SYS_RES_IOPORT,
+ &sc->mtid, RF_ACTIVE);
if (!sc->cs || !sc->mt) {
device_printf(sc->dev, "unable to map IO port space\n");
return ENXIO;
@@ -2422,8 +2422,8 @@ envy24ht_alloc_resource(struct sc_info *sc)
/* allocate interrupt resource */
sc->irqid = 0;
- sc->irq = bus_alloc_resource(sc->dev, SYS_RES_IRQ, &sc->irqid,
- 0, ~0, 1, RF_ACTIVE | RF_SHAREABLE);
+ sc->irq = bus_alloc_resource_any(sc->dev, SYS_RES_IRQ, &sc->irqid,
+ RF_ACTIVE | RF_SHAREABLE);
if (!sc->irq ||
snd_setup_intr(sc->dev, sc->irq, INTR_MPSAFE, envy24ht_intr, sc, &sc->ih)) {
device_printf(sc->dev, "unable to map interrupt\n");
diff --git a/sys/dev/sound/pci/hdspe.c b/sys/dev/sound/pci/hdspe.c
index 8258afc..06411a1 100644
--- a/sys/dev/sound/pci/hdspe.c
+++ b/sys/dev/sound/pci/hdspe.c
@@ -128,8 +128,8 @@ hdspe_alloc_resources(struct sc_info *sc)
/* Allocate resource. */
sc->csid = PCIR_BAR(0);
- sc->cs = bus_alloc_resource(sc->dev, SYS_RES_MEMORY,
- &sc->csid, 0, ~0, 1, RF_ACTIVE);
+ sc->cs = bus_alloc_resource_any(sc->dev, SYS_RES_MEMORY,
+ &sc->csid, RF_ACTIVE);
if (!sc->cs) {
device_printf(sc->dev, "Unable to map SYS_RES_MEMORY.\n");
@@ -141,8 +141,8 @@ hdspe_alloc_resources(struct sc_info *sc)
/* Allocate interrupt resource. */
sc->irqid = 0;
- sc->irq = bus_alloc_resource(sc->dev, SYS_RES_IRQ, &sc->irqid,
- 0, ~0, 1, RF_ACTIVE | RF_SHAREABLE);
+ sc->irq = bus_alloc_resource_any(sc->dev, SYS_RES_IRQ, &sc->irqid,
+ RF_ACTIVE | RF_SHAREABLE);
if (!sc->irq ||
bus_setup_intr(sc->dev, sc->irq, INTR_MPSAFE | INTR_TYPE_AV,
diff --git a/sys/dev/sound/pci/vibes.c b/sys/dev/sound/pci/vibes.c
index 2c74536..4d6be30 100644
--- a/sys/dev/sound/pci/vibes.c
+++ b/sys/dev/sound/pci/vibes.c
@@ -759,8 +759,8 @@ sv_attach(device_t dev) {
/* Register IRQ handler */
sc->irqid = 0;
- sc->irq = bus_alloc_resource(dev, SYS_RES_IRQ, &sc->irqid,
- 0, ~0, 1, RF_ACTIVE | RF_SHAREABLE);
+ sc->irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &sc->irqid,
+ RF_ACTIVE | RF_SHAREABLE);
if (!sc->irq ||
snd_setup_intr(dev, sc->irq, 0, sv_intr, sc, &sc->ih)) {
device_printf(dev, "sv_attach: Unable to map interrupt\n");
OpenPOWER on IntegriCloud