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.
This commit is contained in:
netchild 2006-07-16 20:10:08 +00:00
parent 5afff0eadf
commit cb8969e565
2 changed files with 6 additions and 4 deletions

View File

@ -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);

View File

@ -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;