diff --git a/sys/dev/sound/pci/emu10kx-midi.c b/sys/dev/sound/pci/emu10kx-midi.c index a94b98f9bbd..e6339dbc084 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 5721a2c7644..b20a978af73 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;