summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authornjl <njl@FreeBSD.org>2006-06-10 08:04:38 +0000
committernjl <njl@FreeBSD.org>2006-06-10 08:04:38 +0000
commit0197d975de1cc76bd62725a4b572fc6a2f77fe3b (patch)
tree5b8fd397d5376479b6be3368b5a773066f0ee44d /sys/dev
parent3fe756d72682b4492ccd5169d916f6af48875485 (diff)
downloadFreeBSD-src-0197d975de1cc76bd62725a4b572fc6a2f77fe3b.zip
FreeBSD-src-0197d975de1cc76bd62725a4b572fc6a2f77fe3b.tar.gz
Minor sysctl cleanup. The RW flag means read|write and so it is redundant
to add the RD flag. Also, the debug node does not need to be writable.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/acpica/acpi.c12
-rw-r--r--sys/dev/acpica/acpi_battery.c2
-rw-r--r--sys/dev/acpica/acpi_thermal.c4
3 files changed, 8 insertions, 10 deletions
diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c
index f4e553e..9fe6abc 100644
--- a/sys/dev/acpica/acpi.c
+++ b/sys/dev/acpica/acpi.c
@@ -218,7 +218,7 @@ static struct rman acpi_rman_io, acpi_rman_mem;
static const char* sleep_state_names[] = {
"S0", "S1", "S2", "S3", "S4", "S5", "NONE"};
-SYSCTL_NODE(_debug, OID_AUTO, acpi, CTLFLAG_RW, NULL, "ACPI debugging");
+SYSCTL_NODE(_debug, OID_AUTO, acpi, CTLFLAG_RD, NULL, "ACPI debugging");
static char acpi_ca_version[12];
SYSCTL_STRING(_debug_acpi, OID_AUTO, acpi_ca_version, CTLFLAG_RD,
acpi_ca_version, 0, "Version of Intel ACPI-CA");
@@ -516,14 +516,12 @@ acpi_attach(device_t dev)
OID_AUTO, "suspend_state", CTLTYPE_STRING | CTLFLAG_RW,
&sc->acpi_suspend_sx, 0, acpi_sleep_state_sysctl, "A", "");
SYSCTL_ADD_INT(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree),
- OID_AUTO, "sleep_delay", CTLFLAG_RD | CTLFLAG_RW,
- &sc->acpi_sleep_delay, 0, "sleep delay");
+ OID_AUTO, "sleep_delay", CTLFLAG_RW, &sc->acpi_sleep_delay, 0,
+ "sleep delay");
SYSCTL_ADD_INT(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree),
- OID_AUTO, "s4bios", CTLFLAG_RD | CTLFLAG_RW,
- &sc->acpi_s4bios, 0, "S4BIOS mode");
+ OID_AUTO, "s4bios", CTLFLAG_RW, &sc->acpi_s4bios, 0, "S4BIOS mode");
SYSCTL_ADD_INT(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree),
- OID_AUTO, "verbose", CTLFLAG_RD | CTLFLAG_RW,
- &sc->acpi_verbose, 0, "verbose mode");
+ OID_AUTO, "verbose", CTLFLAG_RW, &sc->acpi_verbose, 0, "verbose mode");
/*
* Default to 1 second before sleeping to give some machines time to
diff --git a/sys/dev/acpica/acpi_battery.c b/sys/dev/acpica/acpi_battery.c
index 65ae958..e5c8d07 100644
--- a/sys/dev/acpica/acpi_battery.c
+++ b/sys/dev/acpica/acpi_battery.c
@@ -482,7 +482,7 @@ acpi_battery_init(void)
NULL, 0, acpi_battery_units_sysctl, "I", "number of batteries");
SYSCTL_ADD_INT(&acpi_battery_sysctl_ctx,
SYSCTL_CHILDREN(acpi_battery_sysctl_tree),
- OID_AUTO, "info_expire", CTLFLAG_RD | CTLFLAG_RW,
+ OID_AUTO, "info_expire", CTLFLAG_RW,
&acpi_battery_info_expire, 0,
"time in seconds until info is refreshed");
diff --git a/sys/dev/acpica/acpi_thermal.c b/sys/dev/acpica/acpi_thermal.c
index d112365..afbe4fb 100644
--- a/sys/dev/acpica/acpi_thermal.c
+++ b/sys/dev/acpica/acpi_thermal.c
@@ -242,12 +242,12 @@ acpi_tz_attach(device_t dev)
OID_AUTO, "thermal", CTLFLAG_RD, 0, "");
SYSCTL_ADD_INT(&acpi_tz_sysctl_ctx,
SYSCTL_CHILDREN(acpi_tz_sysctl_tree),
- OID_AUTO, "min_runtime", CTLFLAG_RD | CTLFLAG_RW,
+ OID_AUTO, "min_runtime", CTLFLAG_RW,
&acpi_tz_min_runtime, 0,
"minimum cooling run time in sec");
SYSCTL_ADD_INT(&acpi_tz_sysctl_ctx,
SYSCTL_CHILDREN(acpi_tz_sysctl_tree),
- OID_AUTO, "polling_rate", CTLFLAG_RD | CTLFLAG_RW,
+ OID_AUTO, "polling_rate", CTLFLAG_RW,
&acpi_tz_polling_rate, 0, "monitor polling rate");
}
sysctl_ctx_init(&sc->tz_sysctl_ctx);
OpenPOWER on IntegriCloud