Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/acpi Protect all header files against multiple inclu...



details:   https://anonhg.NetBSD.org/src/rev/78c5b49304a8
branches:  trunk
changeset: 752733:78c5b49304a8
user:      jruoho <jruoho%NetBSD.org@localhost>
date:      Fri Mar 05 08:30:48 2010 +0000

description:
Protect all header files against multiple inclusions.

diffstat:

 sys/dev/acpi/acpi_ecvar.h   |   8 ++++----
 sys/dev/acpi/acpi_madt.h    |   7 ++++++-
 sys/dev/acpi/acpi_osd.h     |   7 ++++++-
 sys/dev/acpi/acpi_pci.h     |   8 ++++----
 sys/dev/acpi/acpi_slit.h    |   8 ++++----
 sys/dev/acpi/acpi_srat.h    |   8 ++++----
 sys/dev/acpi/acpi_timer.h   |  11 ++++++++---
 sys/dev/acpi/acpi_wakedev.h |   4 ++--
 sys/dev/acpi/acpica.h       |   7 ++++++-
 sys/dev/acpi/acpireg.h      |   7 ++++++-
 sys/dev/acpi/acpivar.h      |   7 ++++++-
 sys/dev/acpi/fdc_acpireg.h  |   7 ++++++-
 sys/dev/acpi/wmi_acpivar.h  |  11 ++++++-----
 13 files changed, 68 insertions(+), 32 deletions(-)

diffs (truncated from 308 to 300 lines):

diff -r 5b77945b6801 -r 78c5b49304a8 sys/dev/acpi/acpi_ecvar.h
--- a/sys/dev/acpi/acpi_ecvar.h Fri Mar 05 07:45:40 2010 +0000
+++ b/sys/dev/acpi/acpi_ecvar.h Fri Mar 05 08:30:48 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: acpi_ecvar.h,v 1.1 2007/12/21 21:22:54 jmcneill Exp $  */
+/*     $NetBSD: acpi_ecvar.h,v 1.2 2010/03/05 08:30:48 jruoho Exp $    */
 
 /*-
  * Copyright (c) 2007 Joerg Sonnenberger <joerg%NetBSD.org@localhost>.
@@ -29,11 +29,11 @@
  * SUCH DAMAGE.
  */
 
-#ifndef _HAVE_DEV_ACPI_ACPI_ECVAR_H
-#define _HAVE_DEV_ACPI_ACPI_ECVAR_H
+#ifndef _SYS_DEV_ACPI_ACPI_ECVAR_H
+#define _SYS_DEV_ACPI_ACPI_ECVAR_H
 
 ACPI_STATUS    acpiec_bus_read(device_t, u_int, ACPI_INTEGER *, int);
 ACPI_STATUS    acpiec_bus_write(device_t, u_int, ACPI_INTEGER, int);
 ACPI_HANDLE    acpiec_get_handle(device_t);
 
-#endif /* !_HAVE_DEV_ACPI_ACPI_ECVAR_H */
+#endif /* !_SYS_DEV_ACPI_ACPI_ECVAR_H */
diff -r 5b77945b6801 -r 78c5b49304a8 sys/dev/acpi/acpi_madt.h
--- a/sys/dev/acpi/acpi_madt.h  Fri Mar 05 07:45:40 2010 +0000
+++ b/sys/dev/acpi/acpi_madt.h  Fri Mar 05 08:30:48 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: acpi_madt.h,v 1.7 2007/12/09 20:27:53 jmcneill Exp $   */
+/*     $NetBSD: acpi_madt.h,v 1.8 2010/03/05 08:30:48 jruoho Exp $     */
 
 /*
  * Copyright (c) 2003 Wasabi Systems, Inc.
@@ -35,6 +35,9 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
+#ifndef _SYS_DEV_ACPI_ACPI_MADT_H
+#define _SYS_DEV_ACPI_ACPI_MADT_H
+
 #define ACPI_PLATFORM_INT_PMI  1
 #define ACPI_PLATFORM_INT_INIT 2
 #define ACPI_PLATFORM_INT_CERR 3
@@ -42,3 +45,5 @@
 ACPI_STATUS acpi_madt_map(void);
 void acpi_madt_unmap(void);
 void acpi_madt_walk(ACPI_STATUS (*)(ACPI_SUBTABLE_HEADER *, void *), void *);
+
+#endif /* !_SYS_DEV_ACPI_ACPI_MADT_H */
diff -r 5b77945b6801 -r 78c5b49304a8 sys/dev/acpi/acpi_osd.h
--- a/sys/dev/acpi/acpi_osd.h   Fri Mar 05 07:45:40 2010 +0000
+++ b/sys/dev/acpi/acpi_osd.h   Fri Mar 05 08:30:48 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: acpi_osd.h,v 1.2 2009/08/23 15:16:16 jmcneill Exp $    */
+/*     $NetBSD: acpi_osd.h,v 1.3 2010/03/05 08:30:48 jruoho Exp $      */
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -35,6 +35,9 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
+#ifndef _SYS_DEV_ACPI_ACPI_OSD_H
+#define _SYS_DEV_ACPI_ACPI_OSD_H
+
 /*
  * Operating System Dependent code for ACPI.  This is an internal
  * header for the ACPICA Osd component.
@@ -45,3 +48,5 @@
 
 /* Osd/OsdSchedule.c */
 void   acpi_osd_sched_init(void);
+
+#endif /* !_SYS_DEV_ACPI_ACPI_OSD_H */
diff -r 5b77945b6801 -r 78c5b49304a8 sys/dev/acpi/acpi_pci.h
--- a/sys/dev/acpi/acpi_pci.h   Fri Mar 05 07:45:40 2010 +0000
+++ b/sys/dev/acpi/acpi_pci.h   Fri Mar 05 08:30:48 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_pci.h,v 1.2 2009/12/04 10:42:39 njoly Exp $ */
+/* $NetBSD: acpi_pci.h,v 1.3 2010/03/05 08:30:48 jruoho Exp $ */
 
 /*
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 #ifndef _SYS_DEV_ACPI_ACPI_PCI_H
 #define _SYS_DEV_ACPI_ACPI_PCI_H
 
-int acpi_pcidev_scan(struct acpi_softc *);
-ACPI_STATUS acpi_pcidev_find(u_int, u_int, u_int, u_int, ACPI_HANDLE *);
+int            acpi_pcidev_scan(struct acpi_softc *);
+ACPI_STATUS    acpi_pcidev_find(u_int, u_int, u_int, u_int, ACPI_HANDLE *);
 
-#endif /* _SYS_DEV_ACPI_ACPI_PCI_H */
+#endif /* !_SYS_DEV_ACPI_ACPI_PCI_H */
diff -r 5b77945b6801 -r 78c5b49304a8 sys/dev/acpi/acpi_slit.h
--- a/sys/dev/acpi/acpi_slit.h  Fri Mar 05 07:45:40 2010 +0000
+++ b/sys/dev/acpi/acpi_slit.h  Fri Mar 05 08:30:48 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_slit.h,v 1.2 2009/12/04 10:42:39 njoly Exp $ */
+/* $NetBSD: acpi_slit.h,v 1.3 2010/03/05 08:30:48 jruoho Exp $ */
 
 /*
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -29,8 +29,8 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef ACPI_SLIT_H
-#define ACPI_SLIT_H
+#ifndef _SYS_DEV_ACPI_ACPI_SLIT_H
+#define _SYS_DEV_ACPI_ACPI_SLIT_H
 
 /* Returns true if ACPI SLIT table is available
  * If table does not exist, all functions below
@@ -51,4 +51,4 @@
 /* Get distance between cpu1 and cpu2 */
 uint32_t acpislit_distance(uint32_t, uint32_t);
 
-#endif /* ACPI_SLIT_H */
+#endif /* !_SYS_DEV_ACPI_ACPI_SLIT_H */
diff -r 5b77945b6801 -r 78c5b49304a8 sys/dev/acpi/acpi_srat.h
--- a/sys/dev/acpi/acpi_srat.h  Fri Mar 05 07:45:40 2010 +0000
+++ b/sys/dev/acpi/acpi_srat.h  Fri Mar 05 08:30:48 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_srat.h,v 1.2 2009/12/04 10:42:39 njoly Exp $ */
+/* $NetBSD: acpi_srat.h,v 1.3 2010/03/05 08:30:48 jruoho Exp $ */
 
 /*
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -29,8 +29,8 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef ACPI_SRAT_H
-#define ACPI_SRAT_H
+#ifndef _SYS_DEV_ACPI_ACPI_SRAT_H
+#define _SYS_DEV_ACPI_ACPI_SRAT_H
 
 typedef uint32_t acpisrat_nodeid_t;
 
@@ -95,4 +95,4 @@
 void acpisrat_cpu(acpisrat_nodeid_t, uint32_t cpunum, struct acpisrat_cpu *);
 void acpisrat_mem(acpisrat_nodeid_t, uint32_t memrange, struct acpisrat_mem *);
 
-#endif /* ACPI_SRAT_H */
+#endif /* !_SYS_DEV_ACPI_ACPI_SRAT_H */
diff -r 5b77945b6801 -r 78c5b49304a8 sys/dev/acpi/acpi_timer.h
--- a/sys/dev/acpi/acpi_timer.h Fri Mar 05 07:45:40 2010 +0000
+++ b/sys/dev/acpi/acpi_timer.h Fri Mar 05 08:30:48 2010 +0000
@@ -1,4 +1,9 @@
-/* $NetBSD: acpi_timer.h,v 1.2 2009/04/08 00:15:45 dyoung Exp $ */
+/* $NetBSD: acpi_timer.h,v 1.3 2010/03/05 08:30:48 jruoho Exp $ */
+
+#ifndef _SYS_DEV_ACPI_ACPI_TIMER_H
+#define _SYS_DEV_ACPI_ACPI_TIMER_H
 
-int acpitimer_init(void);
-int acpitimer_detach(void);
+int    acpitimer_init(void);
+int    acpitimer_detach(void);
+
+#endif /* !_SYS_DEV_ACPI_ACPI_TIMER_H */
diff -r 5b77945b6801 -r 78c5b49304a8 sys/dev/acpi/acpi_wakedev.h
--- a/sys/dev/acpi/acpi_wakedev.h       Fri Mar 05 07:45:40 2010 +0000
+++ b/sys/dev/acpi/acpi_wakedev.h       Fri Mar 05 08:30:48 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_wakedev.h,v 1.1 2009/08/04 14:20:40 jmcneill Exp $ */
+/* $NetBSD: acpi_wakedev.h,v 1.2 2010/03/05 08:30:48 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2009 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -32,4 +32,4 @@
 int    acpi_wakedev_scan(struct acpi_softc *);
 void   acpi_wakedev_commit(struct acpi_softc *);
 
-#endif /* !_SYS_DEV_ACPI_ACPI_WAKEDEV_H */
+#endif /* !_SYS_DEV_ACPI_ACPI_WAKEDEV_H */
diff -r 5b77945b6801 -r 78c5b49304a8 sys/dev/acpi/acpica.h
--- a/sys/dev/acpi/acpica.h     Fri Mar 05 07:45:40 2010 +0000
+++ b/sys/dev/acpi/acpica.h     Fri Mar 05 08:30:48 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: acpica.h,v 1.3 2009/08/18 16:41:02 jmcneill Exp $      */
+/*     $NetBSD: acpica.h,v 1.4 2010/03/05 08:30:48 jruoho Exp $        */
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -35,6 +35,9 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
+#ifndef _SYS_DEV_ACPI_ACPICA_H
+#define _SYS_DEV_ACPI_ACPICA_H
+
 /*
  * Header file glue for ACPICA -- include this to get the ACPICA
  * headers.
@@ -42,3 +45,5 @@
 
 #include <external/intel-public/acpica/dist/include/acpi.h>
 #include <external/intel-public/acpica/dist/include/accommon.h>
+
+#endif /* !_SYS_DEV_ACPI_ACPICA_H */
diff -r 5b77945b6801 -r 78c5b49304a8 sys/dev/acpi/acpireg.h
--- a/sys/dev/acpi/acpireg.h    Fri Mar 05 07:45:40 2010 +0000
+++ b/sys/dev/acpi/acpireg.h    Fri Mar 05 08:30:48 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: acpireg.h,v 1.6 2009/09/16 10:47:54 mlelstv Exp $      */
+/*     $NetBSD: acpireg.h,v 1.7 2010/03/05 08:30:48 jruoho Exp $       */
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -35,6 +35,9 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
+#ifndef _SYS_DEV_ACPI_ACPIREG_H
+#define _SYS_DEV_ACPI_ACPIREG_H
+
 /*
  * This file defines various ACPI event messages, etc.
  */
@@ -320,3 +323,5 @@
 #define        ACPI_LID_COMPONENT      0x00200000
 #define        ACPI_RESOURCE_COMPONENT 0x00400000
 #define        ACPI_TZ_COMPONENT       0x00800000
+
+#endif /* !_SYS_DEV_ACPI_ACPIREG_H */
diff -r 5b77945b6801 -r 78c5b49304a8 sys/dev/acpi/acpivar.h
--- a/sys/dev/acpi/acpivar.h    Fri Mar 05 07:45:40 2010 +0000
+++ b/sys/dev/acpi/acpivar.h    Fri Mar 05 08:30:48 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: acpivar.h,v 1.40 2010/01/31 11:26:20 jruoho Exp $      */
+/*     $NetBSD: acpivar.h,v 1.41 2010/03/05 08:30:48 jruoho Exp $      */
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -35,6 +35,9 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
+#ifndef _SYS_DEV_ACPI_ACPIVAR_H
+#define _SYS_DEV_ACPI_ACPIVAR_H
+
 /*
  * This file defines the ACPI interface provided to the rest of the
  * kernel, as well as the autoconfiguration structures for ACPI
@@ -335,3 +338,5 @@
 #ifdef ACPI_DEBUG
 void acpi_debug_init(void);
 #endif
+
+#endif /* !_SYS_DEV_ACPI_ACPIVAR_H */
diff -r 5b77945b6801 -r 78c5b49304a8 sys/dev/acpi/fdc_acpireg.h
--- a/sys/dev/acpi/fdc_acpireg.h        Fri Mar 05 07:45:40 2010 +0000
+++ b/sys/dev/acpi/fdc_acpireg.h        Fri Mar 05 08:30:48 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fdc_acpireg.h,v 1.1 2003/01/09 00:22:39 jmcneill Exp $ */
+/* $NetBSD: fdc_acpireg.h,v 1.2 2010/03/05 08:30:48 jruoho Exp $ */
 
 /*
  * Copyright (c) 2003 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -25,6 +25,9 @@
  * SUCH DAMAGE.
  */
 
+#ifndef _SYS_DEV_ACPI_FDC_ACPIREG_H
+#define _SYS_DEV_ACPI_FDC_ACPIREG_H
+
 /*
  * The ACPI floppy disk interface is similar to the i386 BIOS. Definitions
  * from arch/i386/isa/nvram.h
@@ -54,3 +57,5 @@
        {  9, 2, 18, 2, 0xff, 0xdf, 0x2a, 0x50, 40,  720, 2, FDC_250KBPS,
          0xf6, 1, "360KB/x" },         /* 320KB in 720KB drive */
 };
+
+#endif /* !_SYS_DEV_ACPI_FDC_ACPIREG_H */
diff -r 5b77945b6801 -r 78c5b49304a8 sys/dev/acpi/wmi_acpivar.h
--- a/sys/dev/acpi/wmi_acpivar.h        Fri Mar 05 07:45:40 2010 +0000
+++ b/sys/dev/acpi/wmi_acpivar.h        Fri Mar 05 08:30:48 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: wmi_acpivar.h,v 1.6 2010/01/04 10:06:53 jruoho Exp $   */
+/*     $NetBSD: wmi_acpivar.h,v 1.7 2010/03/05 08:30:48 jruoho Exp $   */
 
 /*-
  * Copyright (c) 2009, 2010 Jukka Ruohonen <jruohonen%iki.fi@localhost>
@@ -26,11 +26,12 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  */
-#ifndef WMI_ACPIVAR_H
-#define WMI_ACPIVAR_H
+
+#ifndef _SYS_DEV_ACPI_WMI_ACPIVAR_H
+#define _SYS_DEV_ACPI_WMI_ACPIVAR_H
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wmi_acpivar.h,v 1.6 2010/01/04 10:06:53 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wmi_acpivar.h,v 1.7 2010/03/05 08:30:48 jruoho Exp $");
 



Home | Main Index | Thread Index | Old Index