Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/acpi Add support for module(9).
details: https://anonhg.NetBSD.org/src/rev/5160d2af72a6
branches: trunk
changeset: 758195:5160d2af72a6
user: jruoho <jruoho%NetBSD.org@localhost>
date: Mon Oct 25 17:06:58 2010 +0000
description:
Add support for module(9).
diffstat:
sys/dev/acpi/acpi_display.c | 32 ++++++++++++++++++++++++++++++--
sys/dev/acpi/acpi_tz.c | 32 ++++++++++++++++++++++++++++++--
sys/dev/acpi/atk0110.c | 32 ++++++++++++++++++++++++++++++--
sys/dev/acpi/dalb_acpi.c | 34 +++++++++++++++++++++++++++++++---
4 files changed, 121 insertions(+), 9 deletions(-)
diffs (228 lines):
diff -r 79664d2f18ee -r 5160d2af72a6 sys/dev/acpi/acpi_display.c
--- a/sys/dev/acpi/acpi_display.c Mon Oct 25 15:38:05 2010 +0000
+++ b/sys/dev/acpi/acpi_display.c Mon Oct 25 17:06:58 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_display.c,v 1.1 2010/10/12 19:10:50 gsutre Exp $ */
+/* $NetBSD: acpi_display.c,v 1.2 2010/10/25 17:06:58 jruoho Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -66,11 +66,12 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_display.c,v 1.1 2010/10/12 19:10:50 gsutre Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_display.c,v 1.2 2010/10/25 17:06:58 jruoho Exp $");
#include <sys/param.h>
#include <sys/device.h>
#include <sys/kmem.h>
+#include <sys/module.h>
#include <sys/mutex.h>
#include <sys/sysctl.h>
#include <sys/systm.h>
@@ -2004,3 +2005,30 @@
*u = a[j];
return;
}
+
+#ifdef _MODULE
+
+MODULE(MODULE_CLASS_DRIVER, acpivga, NULL);
+
+#include "ioconf.c"
+
+static int
+acpivga_modcmd(modcmd_t cmd, void *context)
+{
+
+ switch (cmd) {
+
+ case MODULE_CMD_INIT:
+ return config_init_component(cfdriver_ioconf_acpivga,
+ cfattach_ioconf_acpivga, cfdata_ioconf_acpivga);
+
+ case MODULE_CMD_FINI:
+ return config_fini_component(cfdriver_ioconf_acpivga,
+ cfattach_ioconf_acpivga, cfdata_ioconf_acpivga);
+
+ default:
+ return ENOTTY;
+ }
+}
+
+#endif /* _MODULE */
diff -r 79664d2f18ee -r 5160d2af72a6 sys/dev/acpi/acpi_tz.c
--- a/sys/dev/acpi/acpi_tz.c Mon Oct 25 15:38:05 2010 +0000
+++ b/sys/dev/acpi/acpi_tz.c Mon Oct 25 17:06:58 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_tz.c,v 1.74 2010/06/07 17:28:17 jruoho Exp $ */
+/* $NetBSD: acpi_tz.c,v 1.75 2010/10/25 17:06:58 jruoho Exp $ */
/*
* Copyright (c) 2003 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -30,12 +30,13 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_tz.c,v 1.74 2010/06/07 17:28:17 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_tz.c,v 1.75 2010/10/25 17:06:58 jruoho Exp $");
#include <sys/param.h>
#include <sys/device.h>
#include <sys/callout.h>
#include <sys/kernel.h>
+#include <sys/module.h>
#include <sys/systm.h>
#include <dev/acpi/acpireg.h>
@@ -796,3 +797,30 @@
break;
}
}
+
+#ifdef _MODULE
+
+MODULE(MODULE_CLASS_DRIVER, acpitz, NULL);
+
+#include "ioconf.c"
+
+static int
+acpitz_modcmd(modcmd_t cmd, void *context)
+{
+
+ switch (cmd) {
+
+ case MODULE_CMD_INIT:
+ return config_init_component(cfdriver_ioconf_acpitz,
+ cfattach_ioconf_acpitz, cfdata_ioconf_acpitz);
+
+ case MODULE_CMD_FINI:
+ return config_fini_component(cfdriver_ioconf_acpitz,
+ cfattach_ioconf_acpitz, cfdata_ioconf_acpitz);
+
+ default:
+ return ENOTTY;
+ }
+}
+
+#endif /* _MODULE */
diff -r 79664d2f18ee -r 5160d2af72a6 sys/dev/acpi/atk0110.c
--- a/sys/dev/acpi/atk0110.c Mon Oct 25 15:38:05 2010 +0000
+++ b/sys/dev/acpi/atk0110.c Mon Oct 25 17:06:58 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: atk0110.c,v 1.12 2010/07/28 16:02:33 jruoho Exp $ */
+/* $NetBSD: atk0110.c,v 1.13 2010/10/25 17:06:58 jruoho Exp $ */
/* $OpenBSD: atk0110.c,v 1.1 2009/07/23 01:38:16 cnst Exp $ */
/*
@@ -18,10 +18,11 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: atk0110.c,v 1.12 2010/07/28 16:02:33 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: atk0110.c,v 1.13 2010/10/25 17:06:58 jruoho Exp $");
#include <sys/param.h>
#include <sys/malloc.h>
+#include <sys/module.h>
#include <sys/systm.h>
#include <dev/acpi/acpireg.h>
@@ -414,3 +415,30 @@
break;
}
}
+
+#ifdef _MODULE
+
+MODULE(MODULE_CLASS_DRIVER, aibs, NULL);
+
+#include "ioconf.c"
+
+static int
+aibs_modcmd(modcmd_t cmd, void *context)
+{
+
+ switch (cmd) {
+
+ case MODULE_CMD_INIT:
+ return config_init_component(cfdriver_ioconf_aibs,
+ cfattach_ioconf_aibs, cfdata_ioconf_aibs);
+
+ case MODULE_CMD_FINI:
+ return config_fini_component(cfdriver_ioconf_aibs,
+ cfattach_ioconf_aibs, cfdata_ioconf_aibs);
+
+ default:
+ return ENOTTY;
+ }
+}
+
+#endif /* _MODULE */
diff -r 79664d2f18ee -r 5160d2af72a6 sys/dev/acpi/dalb_acpi.c
--- a/sys/dev/acpi/dalb_acpi.c Mon Oct 25 15:38:05 2010 +0000
+++ b/sys/dev/acpi/dalb_acpi.c Mon Oct 25 17:06:58 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dalb_acpi.c,v 1.15 2010/04/24 19:36:14 jruoho Exp $ */
+/* $NetBSD: dalb_acpi.c,v 1.16 2010/10/25 17:06:58 jruoho Exp $ */
/*-
* Copyright (c) 2008 Christoph Egger <cegger%netbsd.org@localhost>
@@ -27,7 +27,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dalb_acpi.c,v 1.15 2010/04/24 19:36:14 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dalb_acpi.c,v 1.16 2010/10/25 17:06:58 jruoho Exp $");
/*
* Direct Application Launch Button:
@@ -36,6 +36,7 @@
#include <sys/param.h>
#include <sys/device.h>
+#include <sys/module.h>
#include <sys/systm.h>
#include <dev/acpi/acpireg.h>
@@ -197,7 +198,7 @@
case DALB_SYSTEM_RUNTIME:
rv = AcpiOsExecute(OSL_NOTIFY_HANDLER,
acpi_dalb_get_runtime_hotkeys, dev);
- break;
+ break;
default:
aprint_error_dev(dev,
@@ -259,3 +260,30 @@
return true;
}
+
+#ifdef _MODULE
+
+MODULE(MODULE_CLASS_DRIVER, acpidalb, NULL);
+
+#include "ioconf.c"
+
+static int
+acpidalb_modcmd(modcmd_t cmd, void *context)
+{
+
+ switch (cmd) {
+
+ case MODULE_CMD_INIT:
+ return config_init_component(cfdriver_ioconf_acpidalb,
+ cfattach_ioconf_acpidalb, cfdata_ioconf_acpidalb);
+
+ case MODULE_CMD_FINI:
+ return config_fini_component(cfdriver_ioconf_acpidalb,
+ cfattach_ioconf_acpidalb, cfdata_ioconf_acpidalb);
+
+ default:
+ return ENOTTY;
+ }
+}
+
+#endif /* _MODULE */
Home |
Main Index |
Thread Index |
Old Index