diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2010-06-29 23:03:23 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2010-06-29 23:03:23 +0000 |
commit | 75d6d488835bb219478325951388890c3b2d3a34 (patch) | |
tree | 4a08b5b4a81f96db75ebb1a00360c047125f40b0 /sys/dev/acpi | |
parent | 6c7fd946b6ae8a1ccccfb49eba04d4a0c0175056 (diff) |
Fix ramdisks (new code was placed inside a SMALL_KERNEL chunk)
Diffstat (limited to 'sys/dev/acpi')
-rw-r--r-- | sys/dev/acpi/acpi.c | 59 |
1 files changed, 31 insertions, 28 deletions
diff --git a/sys/dev/acpi/acpi.c b/sys/dev/acpi/acpi.c index 624a3645fbc..bc8d076eafb 100644 --- a/sys/dev/acpi/acpi.c +++ b/sys/dev/acpi/acpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpi.c,v 1.163 2010/06/29 22:08:29 jordan Exp $ */ +/* $OpenBSD: acpi.c,v 1.164 2010/06/29 23:03:22 deraadt Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com> * Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org> @@ -101,12 +101,15 @@ int acpi_foundide(struct aml_node *node, void *arg); int acpiide_notify(struct aml_node *, int, void *); int _acpi_matchhids(const char *, const char *[]); +int acpi_matchhids(struct acpi_attach_args *aa, const char *hids[], + const char *driver); + +struct acpi_q *acpi_maptable(struct acpi_softc *, paddr_t, const char *, + const char *, const char *, int); void wdcattach(struct channel_softc *); int wdcdetach(struct channel_softc *, int); -struct acpi_q *acpi_maptable(struct acpi_softc *, paddr_t, const char *, const char *, const char *, int); - struct idechnl { struct acpi_softc *sc; @@ -517,6 +520,31 @@ acpi_getminbus(union acpi_resource *crs, void *arg) return 0; } +int +_acpi_matchhids(const char *hid, const char *hids[]) +{ + int i; + + for (i = 0; hids[i]; i++) + if (!strcmp(hid, hids[i])) + return (1); + return (0); +} + +int +acpi_matchhids(struct acpi_attach_args *aa, const char *hids[], + const char *driver) +{ + + if (aa->aaa_dev == NULL || aa->aaa_node == NULL) + return (0); + if (_acpi_matchhids(aa->aaa_dev, hids)) { + dnprintf(5, "driver %s matches %s\n", driver, hids[i]); + return (1); + } + return (0); +} + /* Map ACPI device node to PCI */ int acpi_getpci(struct aml_node *node, void *arg) @@ -2430,31 +2458,6 @@ acpi_foundec(struct aml_node *node, void *arg) } int -_acpi_matchhids(const char *hid, const char *hids[]) -{ - int i; - - for (i = 0; hids[i]; i++) - if (!strcmp(hid, hids[i])) - return (1); - return (0); -} - -int -acpi_matchhids(struct acpi_attach_args *aa, const char *hids[], - const char *driver) -{ - - if (aa->aaa_dev == NULL || aa->aaa_node == NULL) - return (0); - if (_acpi_matchhids(aa->aaa_dev, hids)) { - dnprintf(5, "driver %s matches %s\n", driver, hids[i]); - return (1); - } - return (0); -} - -int acpi_foundhid(struct aml_node *node, void *arg) { struct acpi_softc *sc = (struct acpi_softc *)arg; |