diff options
| author | pooka <pooka@NetBSD.org> | 2010-03-21 07:09:56 +0000 |
|---|---|---|
| committer | pooka <pooka@NetBSD.org> | 2010-03-21 07:09:56 +0000 |
| commit | f3beefdb45fa2da92854cc0a3de92b68d297a15b (patch) | |
| tree | 74cca844e65afcd01fc352c7d32057719591d390 /sys/dev/acpi | |
| parent | ce672f239f64242a77100d433abd0f3d036cf5b5 (diff) | |
Convert acpibat to use ioconf instead of homerolled config glue.
Note, config whines about things like:
files.acpi:30: attaching undefined device `apm'
I intentionally was a lazy boy and didn't include a ton of dirt to
keep the hot napalm and riot blasts in the config thread rolling ;)
tested by jruoho (thanks!)
Diffstat (limited to 'sys/dev/acpi')
| -rw-r--r-- | sys/dev/acpi/acpi_bat.c | 30 |
1 files changed, 5 insertions, 25 deletions
diff --git a/sys/dev/acpi/acpi_bat.c b/sys/dev/acpi/acpi_bat.c index 8e8f61406d3..df11d79a577 100644 --- a/sys/dev/acpi/acpi_bat.c +++ b/sys/dev/acpi/acpi_bat.c @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_bat.c,v 1.91 2010/03/17 11:07:59 jruoho Exp $ */ +/* $NetBSD: acpi_bat.c,v 1.92 2010/03/21 07:09:56 pooka Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -75,7 +75,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: acpi_bat.c,v 1.91 2010/03/17 11:07:59 jruoho Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi_bat.c,v 1.92 2010/03/21 07:09:56 pooka Exp $"); #include <sys/param.h> #include <sys/condvar.h> @@ -789,28 +789,8 @@ acpibat_get_limits(struct sysmon_envsys *sme, envsys_data_t *edata, #ifdef _MODULE MODULE(MODULE_CLASS_DRIVER, acpibat, NULL); -CFDRIVER_DECL(acpibat, DV_DULL, NULL); -static int acpibatloc[] = { -1 }; -extern struct cfattach acpibat_ca; - -static struct cfparent acpiparent = { - "acpinodebus", NULL, DVUNIT_ANY -}; - -static struct cfdata acpibat_cfdata[] = { - { - .cf_name = "acpibat", - .cf_atname = "acpibat", - .cf_unit = 0, - .cf_fstate = FSTATE_STAR, - .cf_loc = acpibatloc, - .cf_flags = 0, - .cf_pspec = &acpiparent, - }, - - { NULL } -}; +#include "ioconf.c" static int acpibat_modcmd(modcmd_t cmd, void *context) @@ -833,7 +813,7 @@ acpibat_modcmd(modcmd_t cmd, void *context) return err; } - err = config_cfdata_attach(acpibat_cfdata, 1); + err = config_cfdata_attach(cfdata_acpibat, 1); if (err != 0) { config_cfattach_detach("acpibat", &acpibat_ca); @@ -845,7 +825,7 @@ acpibat_modcmd(modcmd_t cmd, void *context) case MODULE_CMD_FINI: - err = config_cfdata_detach(acpibat_cfdata); + err = config_cfdata_detach(cfdata_acpibat); if (err != 0) return err; |
