git: 6c2e1cd39ed5 - main - LinuxKPI: Add non-ACPI version of ACPI_COMPANION macro

From: Vladimir Kondratyev <wulf_at_FreeBSD.org>
Date: Sun, 08 Nov 2026 06:46:00 UTC
The branch main has been updated by wulf:

URL: https://cgit.FreeBSD.org/src/commit/?id=6c2e1cd39ed57f75bcc612515b70907b6f33170d

commit 6c2e1cd39ed57f75bcc612515b70907b6f33170d
Author:     Vladimir Kondratyev <wulf@FreeBSD.org>
AuthorDate: 2026-11-08 06:45:05 +0000
Commit:     Vladimir Kondratyev <wulf@FreeBSD.org>
CommitDate: 2026-11-08 06:45:05 +0000

    LinuxKPI: Add non-ACPI version of ACPI_COMPANION macro
    
    Required to build drm-kmod om powerpc64.
    
    GHPR:           https://github.com/freebsd/drm-kmod/pull/529
    Reported by:    pkubaj
    Reviewed by:    manu
    Differential Revision:  https://reviews.freebsd.org/D61299
---
 sys/compat/linuxkpi/common/include/linux/acpi.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/sys/compat/linuxkpi/common/include/linux/acpi.h b/sys/compat/linuxkpi/common/include/linux/acpi.h
index 8b86fdfe9044..638d6e2d4f8b 100644
--- a/sys/compat/linuxkpi/common/include/linux/acpi.h
+++ b/sys/compat/linuxkpi/common/include/linux/acpi.h
@@ -52,6 +52,10 @@ to_acpi_device_node(const struct fwnode_handle *fwnode)
 
 #define	ACPI_COMPANION(dev)	to_acpi_device_node((dev)->fwnode)
 
+#else
+
+#define	ACPI_COMPANION(dev)	NULL
+
 #endif
 
 #endif /* _LINUXKPI_LINUX_ACPI_H_ */