Initialize sc->sc_dev before using it, and use it as argument for the
interrupt handler. Makes this work again. OK by christos.
This commit is contained in:
parent
e9d599f49d
commit
f8681c958c
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: atppc_acpi.c,v 1.14 2008/04/28 20:23:47 martin Exp $ */
|
||||
/* $NetBSD: atppc_acpi.c,v 1.15 2008/11/01 20:31:26 hans Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2004 The NetBSD Foundation, Inc.
|
||||
@ -30,7 +30,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: atppc_acpi.c,v 1.14 2008/04/28 20:23:47 martin Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: atppc_acpi.c,v 1.15 2008/11/01 20:31:26 hans Exp $");
|
||||
|
||||
#include "opt_atppc.h"
|
||||
|
||||
@ -117,6 +117,8 @@ atppc_acpi_attach(device_t parent, device_t self, void *aux)
|
||||
aprint_naive(": AT Parallel Port\n");
|
||||
aprint_normal(": AT Parallel Port\n");
|
||||
|
||||
sc->sc_dev = self;
|
||||
|
||||
/* parse resources */
|
||||
rv = acpi_resource_parse(sc->sc_dev, aa->aa_node->ad_handle, "_CRS",
|
||||
&res, &acpi_resource_parse_ops_default);
|
||||
@ -147,7 +149,6 @@ atppc_acpi_attach(device_t parent, device_t self, void *aux)
|
||||
asc->sc_drq = drq->ar_drq;
|
||||
|
||||
/* Attach */
|
||||
sc->sc_dev = self;
|
||||
sc->sc_iot = aa->aa_iot;
|
||||
sc->sc_has = 0;
|
||||
asc->sc_ic = aa->aa_ic;
|
||||
@ -163,7 +164,7 @@ atppc_acpi_attach(device_t parent, device_t self, void *aux)
|
||||
|
||||
sc->sc_ieh = isa_intr_establish(aa->aa_ic, nirq,
|
||||
(irq->ar_type == ACPI_EDGE_SENSITIVE) ? IST_EDGE : IST_LEVEL,
|
||||
IPL_TTY, atppcintr, sc);
|
||||
IPL_TTY, atppcintr, sc->sc_dev);
|
||||
|
||||
/* setup DMA hooks */
|
||||
if (atppc_isadma_setup(sc, asc->sc_ic, asc->sc_drq) == 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user