Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/acpi Change the preprocessor defines around the modu...
details: https://anonhg.NetBSD.org/src/rev/b270d7547848
branches: trunk
changeset: 762124:b270d7547848
user: jruoho <jruoho%NetBSD.org@localhost>
date: Wed Feb 16 09:05:12 2011 +0000
description:
Change the preprocessor defines around the module(9)'s modcmd() calls such
that the modules show in modstat(8) even though these are "builtin".
diffstat:
sys/dev/acpi/acpi_bat.c | 29 +++++++++++++++++++----------
sys/dev/acpi/acpi_display.c | 29 +++++++++++++++++++----------
sys/dev/acpi/acpi_fan.c | 29 +++++++++++++++++++----------
sys/dev/acpi/acpi_pmtr.c | 29 +++++++++++++++++++----------
sys/dev/acpi/acpi_tz.c | 29 +++++++++++++++++++----------
sys/dev/acpi/asus_acpi.c | 29 +++++++++++++++++++----------
sys/dev/acpi/atk0110.c | 29 +++++++++++++++++++----------
sys/dev/acpi/dalb_acpi.c | 29 +++++++++++++++++++----------
sys/dev/acpi/hpqlb_acpi.c | 29 +++++++++++++++++++----------
9 files changed, 171 insertions(+), 90 deletions(-)
diffs (truncated from 585 to 300 lines):
diff -r 69196c1eda31 -r b270d7547848 sys/dev/acpi/acpi_bat.c
--- a/sys/dev/acpi/acpi_bat.c Wed Feb 16 08:35:51 2011 +0000
+++ b/sys/dev/acpi/acpi_bat.c Wed Feb 16 09:05:12 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_bat.c,v 1.108 2011/01/13 13:05:13 jruoho Exp $ */
+/* $NetBSD: acpi_bat.c,v 1.109 2011/02/16 09:05:12 jruoho 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.108 2011/01/13 13:05:13 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_bat.c,v 1.109 2011/02/16 09:05:12 jruoho Exp $");
#include <sys/param.h>
#include <sys/condvar.h>
@@ -832,29 +832,38 @@
*props |= PROP_BATTCAP | PROP_BATTWARN | PROP_DRIVER_LIMITS;
}
-#ifdef _MODULE
-
MODULE(MODULE_CLASS_DRIVER, acpibat, NULL);
+#ifdef _MODULE
#include "ioconf.c"
+#endif
static int
-acpibat_modcmd(modcmd_t cmd, void *context)
+acpibat_modcmd(modcmd_t cmd, void *aux)
{
+ int rv = 0;
switch (cmd) {
case MODULE_CMD_INIT:
- return config_init_component(cfdriver_ioconf_acpibat,
+
+#ifdef _MODULE
+ rv = config_init_component(cfdriver_ioconf_acpibat,
cfattach_ioconf_acpibat, cfdata_ioconf_acpibat);
+#endif
+ break;
case MODULE_CMD_FINI:
- return config_fini_component(cfdriver_ioconf_acpibat,
+
+#ifdef _MODULE
+ rv = config_fini_component(cfdriver_ioconf_acpibat,
cfattach_ioconf_acpibat, cfdata_ioconf_acpibat);
+#endif
+ break;
default:
- return ENOTTY;
+ rv = ENOTTY;
}
+
+ return rv;
}
-
-#endif /* _MODULE */
diff -r 69196c1eda31 -r b270d7547848 sys/dev/acpi/acpi_display.c
--- a/sys/dev/acpi/acpi_display.c Wed Feb 16 08:35:51 2011 +0000
+++ b/sys/dev/acpi/acpi_display.c Wed Feb 16 09:05:12 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_display.c,v 1.8 2011/01/10 09:07:27 jruoho Exp $ */
+/* $NetBSD: acpi_display.c,v 1.9 2011/02/16 09:05:12 jruoho Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -66,7 +66,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_display.c,v 1.8 2011/01/10 09:07:27 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_display.c,v 1.9 2011/02/16 09:05:12 jruoho Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -2066,29 +2066,38 @@
return;
}
-#ifdef _MODULE
-
MODULE(MODULE_CLASS_DRIVER, acpivga, NULL);
+#ifdef _MODULE
#include "ioconf.c"
+#endif
static int
-acpivga_modcmd(modcmd_t cmd, void *context)
+acpivga_modcmd(modcmd_t cmd, void *aux)
{
+ int rv = 0;
switch (cmd) {
case MODULE_CMD_INIT:
- return config_init_component(cfdriver_ioconf_acpivga,
+
+#ifdef _MODULE
+ rv = config_init_component(cfdriver_ioconf_acpivga,
cfattach_ioconf_acpivga, cfdata_ioconf_acpivga);
+#endif
+ break;
case MODULE_CMD_FINI:
- return config_fini_component(cfdriver_ioconf_acpivga,
+
+#ifdef _MODULE
+ rv = config_fini_component(cfdriver_ioconf_acpivga,
cfattach_ioconf_acpivga, cfdata_ioconf_acpivga);
+#endif
+ break;
default:
- return ENOTTY;
+ rv = ENOTTY;
}
+
+ return rv;
}
-
-#endif /* _MODULE */
diff -r 69196c1eda31 -r b270d7547848 sys/dev/acpi/acpi_fan.c
--- a/sys/dev/acpi/acpi_fan.c Wed Feb 16 08:35:51 2011 +0000
+++ b/sys/dev/acpi/acpi_fan.c Wed Feb 16 09:05:12 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_fan.c,v 1.3 2011/01/13 14:25:33 jruoho Exp $ */
+/* $NetBSD: acpi_fan.c,v 1.4 2011/02/16 09:05:12 jruoho Exp $ */
/*-
* Copyright (c) 2011 Jukka Ruohonen <jruohonen%iki.fi@localhost>
@@ -27,7 +27,7 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_fan.c,v 1.3 2011/01/13 14:25:33 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_fan.c,v 1.4 2011/02/16 09:05:12 jruoho Exp $");
#include <sys/param.h>
#include <sys/module.h>
@@ -236,29 +236,38 @@
(void)AcpiOsExecute(OSL_NOTIFY_HANDLER, acpifan_sensor_state, self);
}
-#ifdef _MODULE
-
MODULE(MODULE_CLASS_DRIVER, acpifan, NULL);
+#ifdef _MODULE
#include "ioconf.c"
+#endif
static int
-acpifan_modcmd(modcmd_t cmd, void *context)
+acpifan_modcmd(modcmd_t cmd, void *aux)
{
+ int rv = 0;
switch (cmd) {
case MODULE_CMD_INIT:
- return config_init_component(cfdriver_ioconf_acpifan,
+
+#ifdef _MODULE
+ rv = config_init_component(cfdriver_ioconf_acpifan,
cfattach_ioconf_acpifan, cfdata_ioconf_acpifan);
+#endif
+ break;
case MODULE_CMD_FINI:
- return config_fini_component(cfdriver_ioconf_acpifan,
+
+#ifdef _MODULE
+ rv = config_fini_component(cfdriver_ioconf_acpifan,
cfattach_ioconf_acpifan, cfdata_ioconf_acpifan);
+#endif
+ break;
default:
- return ENOTTY;
+ rv = ENOTTY;
}
+
+ return rv;
}
-
-#endif /* _MODULE */
diff -r 69196c1eda31 -r b270d7547848 sys/dev/acpi/acpi_pmtr.c
--- a/sys/dev/acpi/acpi_pmtr.c Wed Feb 16 08:35:51 2011 +0000
+++ b/sys/dev/acpi/acpi_pmtr.c Wed Feb 16 09:05:12 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_pmtr.c,v 1.2 2011/02/14 18:51:44 jruoho Exp $ */
+/* $NetBSD: acpi_pmtr.c,v 1.3 2011/02/16 09:05:12 jruoho Exp $ */
/*-
* Copyright (c) 2011 Jukka Ruohonen <jruohonen%iki.fi@localhost>
@@ -27,7 +27,7 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_pmtr.c,v 1.2 2011/02/14 18:51:44 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_pmtr.c,v 1.3 2011/02/16 09:05:12 jruoho Exp $");
#include <sys/param.h>
#include <sys/module.h>
@@ -490,29 +490,38 @@
}
}
-#ifdef _MODULE
-
MODULE(MODULE_CLASS_DRIVER, acpipmtr, NULL);
+#ifdef _MODULE
#include "ioconf.c"
+#endif
static int
-acpipmtr_modcmd(modcmd_t cmd, void *context)
+acpipmtr_modcmd(modcmd_t cmd, void *aux)
{
+ int rv = 0;
switch (cmd) {
case MODULE_CMD_INIT:
- return config_init_component(cfdriver_ioconf_acpipmtr,
+
+#ifdef _MODULE
+ rv = config_init_component(cfdriver_ioconf_acpipmtr,
cfattach_ioconf_acpipmtr, cfdata_ioconf_acpipmtr);
+#endif
+ break;
case MODULE_CMD_FINI:
- return config_fini_component(cfdriver_ioconf_acpipmtr,
+
+#ifdef _MODULE
+ rv = config_fini_component(cfdriver_ioconf_acpipmtr,
cfattach_ioconf_acpipmtr, cfdata_ioconf_acpipmtr);
+#endif
+ break;
default:
- return ENOTTY;
+ rv = ENOTTY;
}
+
+ return rv;
}
-
-#endif /* _MODULE */
diff -r 69196c1eda31 -r b270d7547848 sys/dev/acpi/acpi_tz.c
--- a/sys/dev/acpi/acpi_tz.c Wed Feb 16 08:35:51 2011 +0000
+++ b/sys/dev/acpi/acpi_tz.c Wed Feb 16 09:05:12 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_tz.c,v 1.78 2011/01/18 21:15:54 jmcneill Exp $ */
+/* $NetBSD: acpi_tz.c,v 1.79 2011/02/16 09:05:12 jruoho Exp $ */
/*
* Copyright (c) 2003 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_tz.c,v 1.78 2011/01/18 21:15:54 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_tz.c,v 1.79 2011/02/16 09:05:12 jruoho Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -861,29 +861,38 @@
}
}
-#ifdef _MODULE
-
MODULE(MODULE_CLASS_DRIVER, acpitz, NULL);
+#ifdef _MODULE
#include "ioconf.c"
+#endif
static int
-acpitz_modcmd(modcmd_t cmd, void *context)
+acpitz_modcmd(modcmd_t cmd, void *aux)
{
+ int rv = 0;
switch (cmd) {
case MODULE_CMD_INIT:
- return config_init_component(cfdriver_ioconf_acpitz,
Home |
Main Index |
Thread Index |
Old Index