diff --git a/sys/dev/acpi/acpi.c b/sys/dev/acpi/acpi.c index c4d5addddf12..cc6ca909b784 100644 --- a/sys/dev/acpi/acpi.c +++ b/sys/dev/acpi/acpi.c @@ -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 -__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)) { diff --git a/sys/dev/acpi/acpivar.h b/sys/dev/acpi/acpivar.h index d2692e555609..04d14bc4316f 100644 --- a/sys/dev/acpi/acpivar.h +++ b/sys/dev/acpi/acpivar.h @@ -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); diff --git a/sys/dev/acpi/files.acpi b/sys/dev/acpi/files.acpi index e613956ea196..c4981c8e34b4 100644 --- a/sys/dev/acpi/files.acpi +++ b/sys/dev/acpi/files.acpi @@ -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