From bda5449c02802dc240651342303376fdbbb4d504 Mon Sep 17 00:00:00 2001 From: jordan Date: Fri, 23 Jul 2010 20:21:58 +0000 Subject: [PATCH] Don't initialize acpiec pointer in acpi_softc until registration succeeds ok deraadt --- sys/dev/acpi/acpiec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/acpi/acpiec.c b/sys/dev/acpi/acpiec.c index e48f51029bb..abe76b6e466 100644 --- a/sys/dev/acpi/acpiec.c +++ b/sys/dev/acpi/acpiec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpiec.c,v 1.33 2010/07/23 20:19:21 jordan Exp $ */ +/* $OpenBSD: acpiec.c,v 1.34 2010/07/23 20:21:58 jordan Exp $ */ /* * Copyright (c) 2006 Can Erkin Acar * @@ -263,7 +263,6 @@ acpiec_attach(struct device *parent, struct device *self, void *aux) printf(": Only single EC is supported\n"); return; } - sc->sc_acpi->sc_ec = sc; if (acpiec_getcrs(sc, aa)) { printf(": Failed to read resource settings\n"); @@ -275,6 +274,7 @@ acpiec_attach(struct device *parent, struct device *self, void *aux) return; } + sc->sc_acpi->sc_ec = sc; acpiec_get_events(sc); dnprintf(10, "%s: GPE: %d\n", DEVNAME(sc), sc->sc_gpe); -- 2.20.1