PR/34116: Takuya SHIOZAKI: acpiapm(4) misuses config(9)

acpiapm(4) always matches the first node of AML, which is unrelated
with acpiapm. Separate acpi(4)'s children into two individual interface
attributes.
This commit is contained in:
christos 2006-08-06 15:46:54 +00:00
parent 9c74798bdd
commit 0fe2e6efc3
3 changed files with 33 additions and 29 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: files.i386,v 1.290 2006/07/08 20:28:06 christos Exp $
# $NetBSD: files.i386,v 1.291 2006/08/06 15:46:54 christos Exp $
#
# new style config file for i386 architecture
#
@ -479,20 +479,20 @@ file arch/i386/acpi/acpi_wakeup.c acpi
# Toshiba VALD
device vald
attach vald at acpi with vald_acpi
attach vald at acpinodebus with vald_acpi
file arch/i386/acpi/vald_acpi.c vald_acpi
# Sony SPIC (jog dial etc.)
attach spic at acpi with spic_acpi
attach spic at acpinodebus with spic_acpi
file arch/i386/acpi/spic_acpi.c spic_acpi
# Sony Misc (brightness etc.)
device sony
attach sony at acpi with sony_acpi
attach sony at acpinodebus with sony_acpi
file arch/i386/acpi/sony_acpi.c sony_acpi
# Numeric Processing Extension; Math Co-processor
attach npx at acpi with npx_acpi
attach npx at acpinodebus with npx_acpi
file arch/i386/acpi/npx_acpi.c npx_acpi
device vesabios {}

View File

@ -1,4 +1,4 @@
/* $NetBSD: acpi.c,v 1.93 2006/07/04 00:30:23 christos Exp $ */
/* $NetBSD: acpi.c,v 1.94 2006/08/06 15:46:54 christos Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@ -77,7 +77,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.93 2006/07/04 00:30:23 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.94 2006/08/06 15:46:54 christos Exp $");
#include "opt_acpi.h"
#include "opt_pcifixup.h"
@ -519,10 +519,11 @@ acpi_build_tree(struct acpi_softc *sc)
continue;
}
ad->ad_device = config_found(&sc->sc_dev,
&aa, acpi_print);
ad->ad_device = config_found_ia(&sc->sc_dev,
"acpinodebus", &aa, acpi_print);
}
}
config_found_ia(&sc->sc_dev, "acpiapmbus", NULL, NULL);
}
#ifdef ACPI_ACTIVATE_DEV
@ -649,7 +650,7 @@ acpi_make_devnode(ACPI_HANDLE handle, UINT32 level, void *context,
/*
* acpi_print:
*
* Autoconfiguration print routine.
* Autoconfiguration print routine for ACPI node bus.
*/
static int
acpi_print(void *aux, const char *pnp)

View File

@ -1,4 +1,4 @@
# $NetBSD: files.acpi,v 1.38 2006/07/08 20:23:53 christos Exp $
# $NetBSD: files.acpi,v 1.39 2006/08/06 15:46:54 christos Exp $
include "dev/acpi/acpica/files.acpica"
@ -6,7 +6,10 @@ defflag opt_acpi.h ACPIVERBOSE ACPI_DEBUG ACPI_ACTIVATE_DEV
ACPI_DSDT_OVERRIDE ACPI_SCANPCI
defparam opt_acpi.h ACPI_DSDT_FILE
device acpi { }: sysmon_power, sysmon_taskq
define acpiapmbus { }
define acpinodebus { }
device acpi: acpiapmbus, acpinodebus, sysmon_power, sysmon_taskq
attach acpi at acpibus
file dev/acpi/acpi.c acpi needs-flag
file dev/acpi/acpi_resource.c acpi
@ -17,74 +20,74 @@ file dev/acpi/acpi_quirks.c acpi
file dev/acpi/acpi_timer.c acpi
# ACPI/apm emulation.
attach apm at acpi with acpiapm
attach apm at acpiapmbus with acpiapm
file dev/acpi/acpi_apm.c acpiapm
# ACPI Embedded Controller
device acpiec
attach acpiec at acpi
attach acpiec at acpinodebus
file dev/acpi/acpi_ec.c acpiec needs-flag
# ACPI Lid Switch
device acpilid: sysmon_power
attach acpilid at acpi
attach acpilid at acpinodebus
file dev/acpi/acpi_lid.c acpilid
# ACPI Button
device acpibut: sysmon_power
attach acpibut at acpi
attach acpibut at acpinodebus
file dev/acpi/acpi_button.c acpibut
# ACPI AC Adapter
device acpiacad: sysmon_envsys, sysmon_power
attach acpiacad at acpi
attach acpiacad at acpinodebus
file dev/acpi/acpi_acad.c acpiacad
# ACPI Control Method Battery
device acpibat: sysmon_envsys
attach acpibat at acpi
attach acpibat at acpinodebus
file dev/acpi/acpi_bat.c acpibat
# ACPI Thermal Zone
device acpitz: sysmon_envsys
attach acpitz at acpi
attach acpitz at acpinodebus
file dev/acpi/acpi_tz.c acpitz
# Serial interface
attach com at acpi with com_acpi
attach com at acpinodebus with com_acpi
file dev/acpi/com_acpi.c com_acpi
# Floppy disk controller
attach fdc at acpi with fdc_acpi
attach fdc at acpinodebus with fdc_acpi
file dev/acpi/fdc_acpi.c fdc_acpi
# Parallel interface
attach lpt at acpi with lpt_acpi
attach lpt at acpinodebus with lpt_acpi
file dev/acpi/lpt_acpi.c lpt_acpi & !ppbus
attach atppc at acpi with atppc_acpi: isadma
attach atppc at acpinodebus with atppc_acpi: isadma
file dev/acpi/atppc_acpi.c atppc_acpi
# Keyboard controller
attach pckbc at acpi with pckbc_acpi
attach pckbc at acpinodebus with pckbc_acpi
file dev/acpi/pckbc_acpi.c pckbc_acpi
# NeoMagic 256AV audio with CS4232 codec
attach wss at acpi with wss_acpi
attach wss at acpinodebus with wss_acpi
file dev/acpi/wss_acpi.c wss_acpi
# Roland MPU401 (compatible) MIDI UART
attach mpu at acpi with mpu_acpi
attach mpu at acpinodebus with mpu_acpi
file dev/acpi/mpu_acpi.c mpu_acpi
# Joystick/Game port
attach joy at acpi with joy_acpi
attach joy at acpinodebus with joy_acpi
file dev/acpi/joy_acpi.c joy_acpi
# AT-style speaker sound
attach pcppi at acpi with pcppi_acpi
attach pcppi at acpinodebus with pcppi_acpi
file dev/acpi/pcppi_acpi.c pcppi_acpi
# AT Timer
attach attimer at acpi with attimer_acpi
attach attimer at acpinodebus with attimer_acpi
file dev/acpi/attimer_acpi.c attimer_acpi