summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authornetchild <netchild@FreeBSD.org>2006-07-16 20:10:08 +0000
committernetchild <netchild@FreeBSD.org>2006-07-16 20:10:08 +0000
commitcb8969e565057fcd3dbfefdb57899d0d2bb9b234 (patch)
tree8e863fa16125e9fd5be5a61b4609c9948e99aa6e /sys/dev
parent5afff0eadf50c0ee8f55a6a36c7ef1def17a2f45 (diff)
downloadFreeBSD-src-cb8969e565057fcd3dbfefdb57899d0d2bb9b234.zip
FreeBSD-src-cb8969e565057fcd3dbfefdb57899d0d2bb9b234.tar.gz
Fix a compile time problem on amd64. I'm not sure if the fix is correct
from a semantic point of view, but I notified the author of the driver for confirmation. So far it at least fixes the build and should only lead to not identifying or wrongly identifying a soundcard in the worst case.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/sound/pci/emu10kx-midi.c5
-rw-r--r--sys/dev/sound/pci/emu10kx-pcm.c5
2 files changed, 6 insertions, 4 deletions
diff --git a/sys/dev/sound/pci/emu10kx-midi.c b/sys/dev/sound/pci/emu10kx-midi.c
index a94b98f..e6339db 100644
--- a/sys/dev/sound/pci/emu10kx-midi.c
+++ b/sys/dev/sound/pci/emu10kx-midi.c
@@ -135,7 +135,7 @@ static int
emu_midi_probe(device_t dev)
{
struct emu_midi_softc *scp;
- uintptr_t func, r;
+ uintptr_t func, r, is_emu10k1;
r = BUS_READ_IVAR(device_get_parent(dev), dev, 0, &func);
if (func != SCF_MIDI)
@@ -143,7 +143,8 @@ emu_midi_probe(device_t dev)
scp = device_get_softc(dev);
bzero(scp, sizeof(*scp));
- r = BUS_READ_IVAR(device_get_parent(dev), dev, EMU_VAR_ISEMU10K1, &(scp->is_emu10k1));
+ r = BUS_READ_IVAR(device_get_parent(dev), dev, EMU_VAR_ISEMU10K1, &is_emu10k1);
+ scp->is_emu10k1 = is_emu10k1 ? 1 : 0;
device_set_desc(dev, "EMU10Kx MIDI Interface");
return (0);
diff --git a/sys/dev/sound/pci/emu10kx-pcm.c b/sys/dev/sound/pci/emu10kx-pcm.c
index 5721a2c..b20a978 100644
--- a/sys/dev/sound/pci/emu10kx-pcm.c
+++ b/sys/dev/sound/pci/emu10kx-pcm.c
@@ -803,7 +803,7 @@ emu_pcm_attach(device_t dev)
unsigned int i;
char status[SND_STATUSLEN];
uint32_t inte, ipr;
- uintptr_t route, r;
+ uintptr_t route, r, is_emu10k1;
if ((sc = malloc(sizeof(*sc), M_DEVBUF, M_WAITOK | M_ZERO)) == NULL) {
device_printf(dev, "cannot allocate softc\n");
@@ -820,7 +820,8 @@ emu_pcm_attach(device_t dev)
sc->lock = snd_mtxcreate(device_get_nameunit(dev), "sound softc");
sc->dev = dev;
- r = BUS_READ_IVAR(device_get_parent(dev), dev, EMU_VAR_ISEMU10K1, &(sc->is_emu10k1));
+ r = BUS_READ_IVAR(device_get_parent(dev), dev, EMU_VAR_ISEMU10K1, &is_emu10k1);
+ sc->is_emu10k1 = is_emu10k1 ? 1 : 0;
sc->codec = NULL;
OpenPOWER on IntegriCloud