ACPICA: Utilities: Cleanup declarations of the acpi_gbl_debug_file global.
authorLv Zheng <lv.zheng@intel.com>
Wed, 8 Jan 2014 05:45:02 +0000 (13:45 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 8 Jan 2014 14:31:39 +0000 (15:31 +0100)
This global is acting as an OSL global variable, implemented in the
oswinxf.c and osunixxf.c.

This patch cleans up the definition of this variable so that new utilities
do not need to define it in order to link.

Linux kernel behaviour is not affected as the changes only applies to the
ACPICA userspace utilities which are not shipped in the kernel currently.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/acpica/acglobal.h
include/acpi/platform/acenv.h

index 26869987990475eae6e5cfe1c5e2acdc6efeae41..24db8e153bf0e83770573ccc70608b51ea90ddaa 100644 (file)
@@ -500,6 +500,18 @@ ACPI_EXTERN u32 acpi_gbl_size_of_acpi_objects;
 
 #endif                         /* ACPI_DEBUGGER */
 
+/*****************************************************************************
+ *
+ * Application globals
+ *
+ ****************************************************************************/
+
+#ifdef ACPI_APPLICATION
+
+ACPI_FILE ACPI_INIT_GLOBAL(acpi_gbl_debug_file, NULL);
+
+#endif                         /* ACPI_APPLICATION */
+
 /*****************************************************************************
  *
  * Info/help support
index 9c903138179201c6b38ef7d0e99aefceb30b2658..b402eb67af83fd5496669eec6e8ed6fe2d168f58 100644 (file)
@@ -395,4 +395,13 @@ typedef char *va_list;
 
 #endif                         /* ACPI_USE_SYSTEM_CLIBRARY */
 
+#ifndef ACPI_FILE
+#ifdef ACPI_APPLICATION
+#include <stdio.h>
+#define ACPI_FILE              FILE *
+#else
+#define ACPI_FILE              void *
+#endif                         /* ACPI_APPLICATION */
+#endif                         /* ACPI_FILE */
+
 #endif                         /* __ACENV_H__ */