summaryrefslogtreecommitdiffstats
path: root/sys/dev/sound
diff options
context:
space:
mode:
authormarius <marius@FreeBSD.org>2014-06-04 09:54:01 +0000
committermarius <marius@FreeBSD.org>2014-06-04 09:54:01 +0000
commita42890a6a4700c61a90a66580d3589a493a298ad (patch)
tree8145705b8c6c3c67b6c5ce8262bac608d6f2464a /sys/dev/sound
parent805e679faceb9fc6ec8fd372cd3205db83fc1657 (diff)
downloadFreeBSD-src-a42890a6a4700c61a90a66580d3589a493a298ad.zip
FreeBSD-src-a42890a6a4700c61a90a66580d3589a493a298ad.tar.gz
MFC: r266793, r266799, r266808
- Fix compilation with PAE support enabled by merging r233362 and, thus, doing away with the unnecessary uint8_t pointer casting. physical addresses. - Nuke the unused softc of emujoy(4). - Use DEVMETHOD_END. - Use NULL instead of 0 for pointers. Sponsored by: Bally Wulff Games & Entertainment GmbH
Diffstat (limited to 'sys/dev/sound')
-rw-r--r--sys/dev/sound/pci/emu10k1.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/sys/dev/sound/pci/emu10k1.c b/sys/dev/sound/pci/emu10k1.c
index 026c721..72dec78 100644
--- a/sys/dev/sound/pci/emu10k1.c
+++ b/sys/dev/sound/pci/emu10k1.c
@@ -1378,7 +1378,7 @@ emu_memalloc(struct sc_info *sc, u_int32_t sz, bus_addr_t *addr)
ofs = 0;
for (idx = start; idx < start + blksz; idx++) {
mem->bmap[idx >> 3] |= 1 << (idx & 7);
- tmp = (u_int32_t)(u_long)((u_int8_t *)blk->buf_addr + ofs);
+ tmp = (uint32_t)(blk->buf_addr + ofs);
#ifdef EMUDEBUG
printf("pte[%d] -> %x phys, %x virt\n", idx, tmp,
((u_int32_t)buf) + ofs);
@@ -2182,7 +2182,7 @@ static device_method_t emu_methods[] = {
DEVMETHOD(device_attach, emu_pci_attach),
DEVMETHOD(device_detach, emu_pci_detach),
- { 0, 0 }
+ DEVMETHOD_END
};
static driver_t emu_driver = {
@@ -2191,7 +2191,7 @@ static driver_t emu_driver = {
PCM_SOFTC_SIZE,
};
-DRIVER_MODULE(snd_emu10k1, pci, emu_driver, pcm_devclass, 0, 0);
+DRIVER_MODULE(snd_emu10k1, pci, emu_driver, pcm_devclass, NULL, NULL);
MODULE_DEPEND(snd_emu10k1, sound, SOUND_MINVER, SOUND_PREFVER, SOUND_MAXVER);
MODULE_VERSION(snd_emu10k1, 1);
MODULE_DEPEND(snd_emu10k1, midi, 1, 1, 1);
@@ -2220,12 +2220,14 @@ emujoy_pci_probe(device_t dev)
static int
emujoy_pci_attach(device_t dev)
{
+
return 0;
}
static int
emujoy_pci_detach(device_t dev)
{
+
return 0;
}
@@ -2234,16 +2236,15 @@ static device_method_t emujoy_methods[] = {
DEVMETHOD(device_attach, emujoy_pci_attach),
DEVMETHOD(device_detach, emujoy_pci_detach),
- { 0, 0 }
+ DEVMETHOD_END
};
static driver_t emujoy_driver = {
"emujoy",
emujoy_methods,
- 8,
+ 1 /* no softc */
};
static devclass_t emujoy_devclass;
-DRIVER_MODULE(emujoy, pci, emujoy_driver, emujoy_devclass, 0, 0);
-
+DRIVER_MODULE(emujoy, pci, emujoy_driver, emujoy_devclass, NULL, NULL);
OpenPOWER on IntegriCloud