git: 0672e0e38a08 - main - isl: Convert driver to CTLFLAG_MPSAFE
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 12 Jan 2026 00:58:37 UTC
The branch main has been updated by markj:
URL: https://cgit.FreeBSD.org/src/commit/?id=0672e0e38a08c580f723a02bb183344d8c7cee65
commit 0672e0e38a08c580f723a02bb183344d8c7cee65
Author: Abdelkader Boudih <oss@seuros.com>
AuthorDate: 2026-01-12 00:51:57 +0000
Commit: Mark Johnston <markj@FreeBSD.org>
CommitDate: 2026-01-12 00:58:11 +0000
isl: Convert driver to CTLFLAG_MPSAFE
Replace CTLFLAG_NEEDGIANT with CTLFLAG_MPSAFE for all light sensor
sysctls. All of the sysctl handlers are serialized by a driver mutex.
Sysctls converted:
- dev.isl.X.als (ambient light sensor)
- dev.isl.X.ir (infrared sensor)
- dev.isl.X.prox (proximity sensor)
- dev.isl.X.resolution (sensor resolution)
- dev.isl.X.range (sensor range)
Reviewed by: markj
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D54621
---
sys/dev/isl/isl.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/sys/dev/isl/isl.c b/sys/dev/isl/isl.c
index 6a0d406aeeda..815c189adee5 100644
--- a/sys/dev/isl/isl.c
+++ b/sys/dev/isl/isl.c
@@ -202,7 +202,7 @@ isl_attach(device_t dev)
if (use_als) {
SYSCTL_ADD_PROC(sysctl_ctx,
SYSCTL_CHILDREN(sysctl_tree), OID_AUTO, "als",
- CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, sc,
+ CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, sc,
ISL_METHOD_ALS, isl_sysctl, "I",
"Current ALS sensor read-out");
}
@@ -210,7 +210,7 @@ isl_attach(device_t dev)
if (use_ir) {
SYSCTL_ADD_PROC(sysctl_ctx,
SYSCTL_CHILDREN(sysctl_tree), OID_AUTO, "ir",
- CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, sc,
+ CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, sc,
ISL_METHOD_IR, isl_sysctl, "I",
"Current IR sensor read-out");
}
@@ -218,20 +218,20 @@ isl_attach(device_t dev)
if (use_prox) {
SYSCTL_ADD_PROC(sysctl_ctx,
SYSCTL_CHILDREN(sysctl_tree), OID_AUTO, "prox",
- CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, sc,
+ CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, sc,
ISL_METHOD_PROX, isl_sysctl, "I",
"Current proximity sensor read-out");
}
SYSCTL_ADD_PROC(sysctl_ctx,
SYSCTL_CHILDREN(sysctl_tree), OID_AUTO, "resolution",
- CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, sc,
+ CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, sc,
ISL_METHOD_RESOLUTION, isl_sysctl, "I",
"Current proximity sensor resolution");
SYSCTL_ADD_PROC(sysctl_ctx,
SYSCTL_CHILDREN(sysctl_tree), OID_AUTO, "range",
- CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, sc,
+ CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, sc,
ISL_METHOD_RANGE, isl_sysctl, "I",
"Current proximity sensor range");