git: 7fa1552a6a6d - main - sys/power.h: Add `_KERNEL` guards

From: Aymeric Wibo <obiwac_at_FreeBSD.org>
Date: Fri, 05 Sep 2025 17:02:39 UTC
The branch main has been updated by obiwac:

URL: https://cgit.FreeBSD.org/src/commit/?id=7fa1552a6a6db281ce9c7dd03dc035609a87fb6f

commit 7fa1552a6a6db281ce9c7dd03dc035609a87fb6f
Author:     Aymeric Wibo <obiwac@FreeBSD.org>
AuthorDate: 2025-09-05 16:54:00 +0000
Commit:     Aymeric Wibo <obiwac@FreeBSD.org>
CommitDate: 2025-09-05 17:01:05 +0000

    sys/power.h: Add `_KERNEL` guards
    
    There is no userland interface which would need these, so make header
    kernel-only.
    
    Reviewed by:    jrm (mentor), markj
    Approved by:    jrm (mentor), markj
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D52395
---
 sys/sys/power.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sys/sys/power.h b/sys/sys/power.h
index 9afa55dd403a..3ee021b0e587 100644
--- a/sys/sys/power.h
+++ b/sys/sys/power.h
@@ -28,6 +28,7 @@
 
 #ifndef _SYS_POWER_H_
 #define _SYS_POWER_H_
+#ifdef _KERNEL
 
 #include <sys/_eventhandler.h>
 
@@ -60,4 +61,5 @@ extern void	power_profile_set_state(int);
 typedef void (*power_profile_change_hook)(void *, int);
 EVENTHANDLER_DECLARE(power_profile_change, power_profile_change_hook);
 
+#endif	/* _KERNEL */
 #endif	/* !_SYS_POWER_H_ */