mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-20 11:11:24 +00:00
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.
This commit is contained in:
parent
e4c7a7b169
commit
197b4dcc64
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=159476
@ -218,7 +218,7 @@ static struct rman acpi_rman_io, acpi_rman_mem;
|
|||||||
static const char* sleep_state_names[] = {
|
static const char* sleep_state_names[] = {
|
||||||
"S0", "S1", "S2", "S3", "S4", "S5", "NONE"};
|
"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];
|
static char acpi_ca_version[12];
|
||||||
SYSCTL_STRING(_debug_acpi, OID_AUTO, acpi_ca_version, CTLFLAG_RD,
|
SYSCTL_STRING(_debug_acpi, OID_AUTO, acpi_ca_version, CTLFLAG_RD,
|
||||||
acpi_ca_version, 0, "Version of Intel ACPI-CA");
|
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,
|
OID_AUTO, "suspend_state", CTLTYPE_STRING | CTLFLAG_RW,
|
||||||
&sc->acpi_suspend_sx, 0, acpi_sleep_state_sysctl, "A", "");
|
&sc->acpi_suspend_sx, 0, acpi_sleep_state_sysctl, "A", "");
|
||||||
SYSCTL_ADD_INT(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree),
|
SYSCTL_ADD_INT(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree),
|
||||||
OID_AUTO, "sleep_delay", CTLFLAG_RD | CTLFLAG_RW,
|
OID_AUTO, "sleep_delay", CTLFLAG_RW, &sc->acpi_sleep_delay, 0,
|
||||||
&sc->acpi_sleep_delay, 0, "sleep delay");
|
"sleep delay");
|
||||||
SYSCTL_ADD_INT(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree),
|
SYSCTL_ADD_INT(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree),
|
||||||
OID_AUTO, "s4bios", CTLFLAG_RD | CTLFLAG_RW,
|
OID_AUTO, "s4bios", CTLFLAG_RW, &sc->acpi_s4bios, 0, "S4BIOS mode");
|
||||||
&sc->acpi_s4bios, 0, "S4BIOS mode");
|
|
||||||
SYSCTL_ADD_INT(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree),
|
SYSCTL_ADD_INT(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree),
|
||||||
OID_AUTO, "verbose", CTLFLAG_RD | CTLFLAG_RW,
|
OID_AUTO, "verbose", CTLFLAG_RW, &sc->acpi_verbose, 0, "verbose mode");
|
||||||
&sc->acpi_verbose, 0, "verbose mode");
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Default to 1 second before sleeping to give some machines time to
|
* Default to 1 second before sleeping to give some machines time to
|
||||||
|
@ -482,7 +482,7 @@ acpi_battery_init(void)
|
|||||||
NULL, 0, acpi_battery_units_sysctl, "I", "number of batteries");
|
NULL, 0, acpi_battery_units_sysctl, "I", "number of batteries");
|
||||||
SYSCTL_ADD_INT(&acpi_battery_sysctl_ctx,
|
SYSCTL_ADD_INT(&acpi_battery_sysctl_ctx,
|
||||||
SYSCTL_CHILDREN(acpi_battery_sysctl_tree),
|
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,
|
&acpi_battery_info_expire, 0,
|
||||||
"time in seconds until info is refreshed");
|
"time in seconds until info is refreshed");
|
||||||
|
|
||||||
|
@ -242,12 +242,12 @@ acpi_tz_attach(device_t dev)
|
|||||||
OID_AUTO, "thermal", CTLFLAG_RD, 0, "");
|
OID_AUTO, "thermal", CTLFLAG_RD, 0, "");
|
||||||
SYSCTL_ADD_INT(&acpi_tz_sysctl_ctx,
|
SYSCTL_ADD_INT(&acpi_tz_sysctl_ctx,
|
||||||
SYSCTL_CHILDREN(acpi_tz_sysctl_tree),
|
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,
|
&acpi_tz_min_runtime, 0,
|
||||||
"minimum cooling run time in sec");
|
"minimum cooling run time in sec");
|
||||||
SYSCTL_ADD_INT(&acpi_tz_sysctl_ctx,
|
SYSCTL_ADD_INT(&acpi_tz_sysctl_ctx,
|
||||||
SYSCTL_CHILDREN(acpi_tz_sysctl_tree),
|
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");
|
&acpi_tz_polling_rate, 0, "monitor polling rate");
|
||||||
}
|
}
|
||||||
sysctl_ctx_init(&sc->tz_sysctl_ctx);
|
sysctl_ctx_init(&sc->tz_sysctl_ctx);
|
||||||
|
Loading…
Reference in New Issue
Block a user