Only call acpiec_early_attach() in "acpi.c" if the kernel is configured
to include the "acpiec" device.
This commit is contained in:
parent
7ac0ae8c23
commit
d44cf8f504
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: acpi.c,v 1.60 2004/03/30 15:18:55 kochi Exp $ */
|
||||
/* $NetBSD: acpi.c,v 1.61 2004/03/31 11:19:39 tron Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2003 The NetBSD Foundation, Inc.
|
||||
|
@ -77,7 +77,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.60 2004/03/30 15:18:55 kochi Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.61 2004/03/31 11:19:39 tron Exp $");
|
||||
|
||||
#include "opt_acpi.h"
|
||||
|
||||
|
@ -294,7 +294,9 @@ acpi_attach(struct device *parent, struct device *self, void *aux)
|
|||
}
|
||||
|
||||
/* early EC handler initialization if ECDT table is available */
|
||||
#if NACPIEC > 0
|
||||
acpiec_early_attach(&sc->sc_dev);
|
||||
#endif
|
||||
|
||||
rv = AcpiInitializeObjects(0);
|
||||
if (ACPI_FAILURE(rv)) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: acpivar.h,v 1.16 2004/03/30 15:18:56 kochi Exp $ */
|
||||
/* $NetBSD: acpivar.h,v 1.17 2004/03/31 11:19:39 tron Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 2001 Wasabi Systems, Inc.
|
||||
|
@ -272,7 +272,15 @@ ACPI_STATUS acpi_resource_parse(struct device *, struct acpi_devnode *,
|
|||
void *, const struct acpi_resource_parse_ops *);
|
||||
void acpi_resource_print(struct device *, struct acpi_resources *);
|
||||
|
||||
#if defined(_KERNEL_OPT)
|
||||
#include "acpiec.h"
|
||||
|
||||
#if NACPIEC > 0
|
||||
void acpiec_early_attach(struct device *);
|
||||
#endif
|
||||
#else
|
||||
#define NACPIEC 0
|
||||
#endif
|
||||
|
||||
struct acpi_io *acpi_res_io(struct acpi_resources *, int);
|
||||
struct acpi_iorange *acpi_res_iorange(struct acpi_resources *, int);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: files.acpi,v 1.22 2004/01/31 13:59:20 jdolecek Exp $
|
||||
# $NetBSD: files.acpi,v 1.23 2004/03/31 11:19:39 tron Exp $
|
||||
|
||||
include "dev/acpi/acpica/files.acpica"
|
||||
|
||||
|
@ -14,7 +14,7 @@ file dev/acpi/acpi_quirks.c acpi
|
|||
# ACPI Embedded Controller
|
||||
device acpiec
|
||||
attach acpiec at acpi
|
||||
file dev/acpi/acpi_ec.c acpiec
|
||||
file dev/acpi/acpi_ec.c acpiec needs-flag
|
||||
|
||||
# ACPI Lid Switch
|
||||
device acpilid: sysmon_power
|
||||
|
|
Loading…
Reference in New Issue