From a885159feac26264f3d7ce3f29b375b3380baa14 Mon Sep 17 00:00:00 2001 From: Nate Lawson Date: Mon, 28 Feb 2005 05:39:34 +0000 Subject: [PATCH] Protect against multiple includes and use _KERNEL to protect the PCI fns. --- sys/dev/acpica/acpi_pcibvar.h | 4 +++- sys/dev/acpica/acpiio.h | 6 ++++++ sys/dev/acpica/acpivar.h | 5 +++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/sys/dev/acpica/acpi_pcibvar.h b/sys/dev/acpica/acpi_pcibvar.h index 908256898c46..5514a262b82d 100644 --- a/sys/dev/acpica/acpi_pcibvar.h +++ b/sys/dev/acpica/acpi_pcibvar.h @@ -30,6 +30,7 @@ #ifndef _ACPI_PCIBVAR_H_ #define _ACPI_PCIBVAR_H_ +#ifdef _KERNEL void acpi_pci_link_add_reference(device_t dev, int index, device_t pcib, int slot, int pin); int acpi_pci_link_route_interrupt(device_t dev, int index); @@ -37,5 +38,6 @@ int acpi_pcib_attach(device_t bus, ACPI_BUFFER *prt, int busno); int acpi_pcib_route_interrupt(device_t pcib, device_t dev, int pin, ACPI_BUFFER *prtbuf); int acpi_pcib_resume(device_t dev); +#endif /* _KERNEL */ -#endif +#endif /* !_ACPI_PCIBVAR_H_ */ diff --git a/sys/dev/acpica/acpiio.h b/sys/dev/acpica/acpiio.h index 4f059e79109c..dbb394aabcc9 100644 --- a/sys/dev/acpica/acpiio.h +++ b/sys/dev/acpica/acpiio.h @@ -27,6 +27,9 @@ * $FreeBSD$ */ +#ifndef _ACPIIO_H_ +#define _ACPIIO_H_ + /* * Core ACPI subsystem ioctls */ @@ -96,6 +99,7 @@ union acpi_battery_ioctl_arg { #define ACPIIO_CMBAT_GET_BIF _IOWR('B', 0x10, union acpi_battery_ioctl_arg) #define ACPIIO_CMBAT_GET_BST _IOWR('B', 0x11, union acpi_battery_ioctl_arg) +/* Get AC adapter status. */ #define ACPIIO_ACAD_GET_STATUS _IOR('A', 1, int) #ifdef _KERNEL @@ -103,3 +107,5 @@ typedef int (*acpi_ioctl_fn)(u_long cmd, caddr_t addr, void *arg); extern int acpi_register_ioctl(u_long cmd, acpi_ioctl_fn fn, void *arg); extern void acpi_deregister_ioctl(u_long cmd, acpi_ioctl_fn fn); #endif + +#endif /* !_ACPIIO_H_ */ diff --git a/sys/dev/acpica/acpivar.h b/sys/dev/acpica/acpivar.h index fc800e5cdcee..7481a234676c 100644 --- a/sys/dev/acpica/acpivar.h +++ b/sys/dev/acpica/acpivar.h @@ -28,6 +28,9 @@ * $FreeBSD$ */ +#ifndef _ACPIVAR_H_ +#define _ACPIVAR_H_ + #include "acpi_if.h" #include "bus_if.h" #include @@ -406,3 +409,5 @@ ACPI_HANDLE acpi_GetReference(ACPI_HANDLE scope, ACPI_OBJECT *obj); /* ACPI task kernel thread initialization. */ int acpi_task_thread_init(void); + +#endif /* !_ACPIVAR_H_ */