summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorariff <ariff@FreeBSD.org>2007-02-23 19:41:16 +0000
committerariff <ariff@FreeBSD.org>2007-02-23 19:41:16 +0000
commitfb9e9fec1a33fb5bc63ae50fcbac342496a846a1 (patch)
treea326a11b6589fc98752c5abacd9e392914c7438d
parent6a57a4f091e836942c8dae1106edeeb3f7fb205a (diff)
downloadFreeBSD-src-fb9e9fec1a33fb5bc63ae50fcbac342496a846a1.zip
FreeBSD-src-fb9e9fec1a33fb5bc63ae50fcbac342496a846a1.tar.gz
- Revert arguments for several functions to pre bus_get_dma_tag()
changes. Each softc contains information about their own device_t, use that instead. - bus_setup_intr() -> snd_setup_intr().
-rw-r--r--sys/dev/sound/pci/ds1.c10
-rw-r--r--sys/dev/sound/pci/emu10kx.c10
-rw-r--r--sys/dev/sound/pci/envy24.c7
-rw-r--r--sys/dev/sound/pci/envy24ht.c7
4 files changed, 18 insertions, 16 deletions
diff --git a/sys/dev/sound/pci/ds1.c b/sys/dev/sound/pci/ds1.c
index 7549211..b2b81c1 100644
--- a/sys/dev/sound/pci/ds1.c
+++ b/sys/dev/sound/pci/ds1.c
@@ -157,7 +157,7 @@ struct {
*/
/* stuff */
-static int ds_init(struct sc_info *, device_t);
+static int ds_init(struct sc_info *);
static void ds_intr(void *);
/* talk to the card */
@@ -785,7 +785,7 @@ ds_setmap(void *arg, bus_dma_segment_t *segs, int nseg, int error)
}
static int
-ds_init(struct sc_info *sc, device_t dev)
+ds_init(struct sc_info *sc)
{
int i;
u_int32_t *ci, r, pcs, rcs, ecs, ws, memsz, cb;
@@ -833,7 +833,7 @@ ds_init(struct sc_info *sc, device_t dev)
memsz += (64 + 1) * 4;
if (sc->regbase == NULL) {
- if (bus_dma_tag_create(bus_get_dma_tag(dev), 2, 0,
+ if (bus_dma_tag_create(bus_get_dma_tag(sc->dev), 2, 0,
BUS_SPACE_MAXADDR_32BIT,
BUS_SPACE_MAXADDR,
NULL, NULL, memsz, 1, memsz, 0, NULL,
@@ -985,7 +985,7 @@ ds_pci_attach(device_t dev)
}
sc->regbase = NULL;
- if (ds_init(sc, dev) == -1) {
+ if (ds_init(sc) == -1) {
device_printf(dev, "unable to initialize the card\n");
goto bad;
}
@@ -1053,7 +1053,7 @@ ds_pci_resume(device_t dev)
sc = pcm_getdevinfo(dev);
- if (ds_init(sc, dev) == -1) {
+ if (ds_init(sc) == -1) {
device_printf(dev, "unable to reinitialize the card\n");
return ENXIO;
}
diff --git a/sys/dev/sound/pci/emu10kx.c b/sys/dev/sound/pci/emu10kx.c
index 4e6afd2..6f46c8d 100644
--- a/sys/dev/sound/pci/emu10kx.c
+++ b/sys/dev/sound/pci/emu10kx.c
@@ -385,7 +385,7 @@ static void emu_addefxop(struct emu_sc_info *sc, unsigned int op, unsigned int z
static void emu_initefx(struct emu_sc_info *sc);
static int emu_cardbus_init(struct emu_sc_info *sc);
-static int emu_init(struct emu_sc_info *sc, device_t dev);
+static int emu_init(struct emu_sc_info *sc);
static int emu_uninit(struct emu_sc_info *sc);
static int emu_read_ivar(device_t bus __unused, device_t dev, int ivar_index, uintptr_t * result);
@@ -2338,7 +2338,7 @@ emu_cardbus_init(struct emu_sc_info *sc)
/* Probe and attach the card */
static int
-emu_init(struct emu_sc_info *sc, device_t dev)
+emu_init(struct emu_sc_info *sc)
{
uint32_t ch, tmp;
uint32_t spdif_sr;
@@ -2385,7 +2385,7 @@ emu_init(struct emu_sc_info *sc, device_t dev)
emu_wrptr(sc, 0, SPBYPASS, 0xf00); /* What will happen if
* we write 1 here? */
- if (bus_dma_tag_create( /* parent */ bus_get_dma_tag(dev),
+ if (bus_dma_tag_create( /* parent */ bus_get_dma_tag(sc->dev),
/* alignment */ 2, /* boundary */ 0,
/* lowaddr */ 1 << 31, /* can only access 0-2gb */
/* highaddr */ BUS_SPACE_MAXADDR,
@@ -2835,7 +2835,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, NULL, emu_intr, sc, &sc->ih)) {
+ if ((sc->irq == NULL) || snd_setup_intr(dev, sc->irq, INTR_MPSAFE, emu_intr, sc, &sc->ih)) {
device_printf(dev, "unable to map interrupt\n");
goto bad;
}
@@ -2854,7 +2854,7 @@ emu_pci_attach(device_t dev)
sc->root = device_get_sysctl_tree(dev);
if (sc->root == NULL)
goto bad;
- if (emu_init(sc, dev) == -1) {
+ if (emu_init(sc) == -1) {
device_printf(dev, "unable to initialize the card\n");
goto bad;
}
diff --git a/sys/dev/sound/pci/envy24.c b/sys/dev/sound/pci/envy24.c
index b83303b..33cdb74 100644
--- a/sys/dev/sound/pci/envy24.c
+++ b/sys/dev/sound/pci/envy24.c
@@ -2301,7 +2301,7 @@ envy24_init(struct sc_info *sc)
}
static int
-envy24_alloc_resource(struct sc_info *sc, device_t dev)
+envy24_alloc_resource(struct sc_info *sc)
{
/* allocate I/O port resource */
sc->csid = PCIR_CCS;
@@ -2348,7 +2348,8 @@ envy24_alloc_resource(struct sc_info *sc, device_t dev)
}
/* allocate DMA resource */
- if (bus_dma_tag_create(/*parent*/bus_get_dma_tag(dev), /*alignment*/4,
+ if (bus_dma_tag_create(/*parent*/bus_get_dma_tag(sc->dev),
+ /*alignment*/4,
/*boundary*/0,
/*lowaddr*/BUS_SPACE_MAXADDR_ENVY24,
/*highaddr*/BUS_SPACE_MAXADDR_ENVY24,
@@ -2395,7 +2396,7 @@ envy24_pci_attach(device_t dev)
data = pci_read_config(dev, PCIR_COMMAND, 2);
/* allocate resources */
- err = envy24_alloc_resource(sc, dev);
+ err = envy24_alloc_resource(sc);
if (err) {
device_printf(dev, "unable to allocate system resources\n");
goto bad;
diff --git a/sys/dev/sound/pci/envy24ht.c b/sys/dev/sound/pci/envy24ht.c
index c8102d5..c2ff685 100644
--- a/sys/dev/sound/pci/envy24ht.c
+++ b/sys/dev/sound/pci/envy24ht.c
@@ -2332,7 +2332,7 @@ envy24ht_init(struct sc_info *sc)
}
static int
-envy24ht_alloc_resource(struct sc_info *sc, device_t dev)
+envy24ht_alloc_resource(struct sc_info *sc)
{
/* allocate I/O port resource */
sc->csid = PCIR_CCS;
@@ -2367,7 +2367,8 @@ envy24ht_alloc_resource(struct sc_info *sc, device_t dev)
}
/* allocate DMA resource */
- if (bus_dma_tag_create(/*parent*/bus_get_dma_tag(dev), /*alignment*/4,
+ if (bus_dma_tag_create(/*parent*/bus_get_dma_tag(sc->dev),
+ /*alignment*/4,
/*boundary*/0,
/*lowaddr*/BUS_SPACE_MAXADDR_ENVY24,
/*highaddr*/BUS_SPACE_MAXADDR_ENVY24,
@@ -2414,7 +2415,7 @@ envy24ht_pci_attach(device_t dev)
data = pci_read_config(dev, PCIR_COMMAND, 2);
/* allocate resources */
- err = envy24ht_alloc_resource(sc, dev);
+ err = envy24ht_alloc_resource(sc);
if (err) {
device_printf(dev, "unable to allocate system resources\n");
goto bad;
OpenPOWER on IntegriCloud