From: kettenis Date: Thu, 29 Jul 2010 18:32:26 +0000 (+0000) Subject: Don't set sc_ec until after the EC registers are mapped, but before we X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=2e9b22c877809f09551587aaa7f652d79ed6f88d;p=openbsd Don't set sc_ec until after the EC registers are mapped, but before we execute the _REG method to make the EC available to the AML. ok marco@ --- diff --git a/sys/dev/acpi/acpiec.c b/sys/dev/acpi/acpiec.c index 2332234a16b..d455029fb4d 100644 --- a/sys/dev/acpi/acpiec.c +++ b/sys/dev/acpi/acpiec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpiec.c,v 1.39 2010/07/27 22:57:22 deraadt Exp $ */ +/* $OpenBSD: acpiec.c,v 1.40 2010/07/29 18:32:26 kettenis Exp $ */ /* * Copyright (c) 2006 Can Erkin Acar * @@ -267,13 +267,13 @@ acpiec_attach(struct device *parent, struct device *self, void *aux) sc->sc_acpi = (struct acpi_softc *)parent; sc->sc_devnode = aa->aaa_node; - sc->sc_acpi->sc_ec = sc; - if (acpiec_getcrs(sc, aa)) { printf(": Failed to read resource settings\n"); return; } + sc->sc_acpi->sc_ec = sc; + if (acpiec_reg(sc)) { printf(": Failed to register address space\n"); return;