Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F140063922
D54313.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D54313.id.diff
View Options
diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c
--- a/sys/dev/acpica/acpi.c
+++ b/sys/dev/acpica/acpi.c
@@ -4197,8 +4197,8 @@
void *arg;
};
-static TAILQ_HEAD(,acpi_ioctl_hook) acpi_ioctl_hooks;
-static int acpi_ioctl_hooks_initted;
+static TAILQ_HEAD(,acpi_ioctl_hook) acpi_ioctl_hooks =
+ TAILQ_HEAD_INITIALIZER(acpi_ioctl_hooks);
int
acpi_register_ioctl(u_long cmd, acpi_ioctl_fn fn, void *arg)
@@ -4211,10 +4211,6 @@
hp->arg = arg;
ACPI_LOCK(acpi);
- if (acpi_ioctl_hooks_initted == 0) {
- TAILQ_INIT(&acpi_ioctl_hooks);
- acpi_ioctl_hooks_initted = 1;
- }
TAILQ_FOREACH(thp, &acpi_ioctl_hooks, link) {
if (thp->cmd == cmd) {
ACPI_UNLOCK(acpi);
@@ -4274,11 +4270,10 @@
* Scan the list of registered ioctls, looking for handlers.
*/
ACPI_LOCK(acpi);
- if (acpi_ioctl_hooks_initted)
- TAILQ_FOREACH(hp, &acpi_ioctl_hooks, link) {
- if (hp->cmd == cmd)
- break;
- }
+ TAILQ_FOREACH(hp, &acpi_ioctl_hooks, link) {
+ if (hp->cmd == cmd)
+ break;
+ }
ACPI_UNLOCK(acpi);
if (hp)
return (hp->fn(cmd, addr, hp->arg));
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 20, 6:04 PM (1 h, 59 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27098313
Default Alt Text
D54313.id.diff (1 KB)
Attached To
Mode
D54313: acpi: Statically initialize acpi_ioctl_hooks
Attached
Detach File
Event Timeline
Log In to Comment