Fix a couple of mistakes in the device_t/softc split that cause
machines such as my HP Pavilion N3270 to freeze at boot. This should fix PR kern/38815, too.
This commit is contained in:
parent
f5792c6ee8
commit
fa64da0d81
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: esa.c,v 1.49 2008/05/13 19:24:06 jmcneill Exp $ */
|
||||
/* $NetBSD: esa.c,v 1.50 2008/06/10 21:19:01 dyoung Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001-2008 Jared D. McNeill <jmcneill@invisible.ca>
|
||||
@ -39,7 +39,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: esa.c,v 1.49 2008/05/13 19:24:06 jmcneill Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: esa.c,v 1.50 2008/06/10 21:19:01 dyoung Exp $");
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/errno.h>
|
||||
@ -1051,7 +1051,7 @@ esa_attach(device_t parent, device_t self, void *aux)
|
||||
return;
|
||||
}
|
||||
intrstr = pci_intr_string(pc, ih);
|
||||
sc->sc_ih = pci_intr_establish(pc, ih, IPL_AUDIO, esa_intr, self);
|
||||
sc->sc_ih = pci_intr_establish(pc, ih, IPL_AUDIO, esa_intr, sc);
|
||||
if (sc->sc_ih == NULL) {
|
||||
aprint_error_dev(sc->sc_dev, "can't establish interrupt");
|
||||
if (intrstr != NULL)
|
||||
@ -1104,7 +1104,7 @@ esa_attach(device_t parent, device_t self, void *aux)
|
||||
|
||||
|
||||
/* Attach AC97 host interface */
|
||||
sc->host_if.arg = self;
|
||||
sc->host_if.arg = sc;
|
||||
sc->host_if.attach = esa_attach_codec;
|
||||
sc->host_if.read = esa_read_codec;
|
||||
sc->host_if.write = esa_write_codec;
|
||||
|
Loading…
Reference in New Issue
Block a user