aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLv Zheng <lv.zheng@intel.com>2016-08-04 04:44:04 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-08-12 21:09:33 -0400
commite8f2c16f74ed1eb26e3c8030e7a14213474393ee (patch)
treed4caa56e70ac4a9448486d70a4625b4bb40f8298
parent6ea8c546f3655a81f82672f24b66dad6095bdd07 (diff)
ACPICA: Debugger: Fix wrong inclusions in dbfileio.c
ACPICA commit 649eb441fbef21965d10a1aca6ff41dcf23f8e05 dbfileio.c implements debugger functionalities that can only be used by the application layer debugger (acpiexec), thus it should always include <acapps.h> and thus shouldn't include <stdio.h> separately. Lv Zheng. Link: https://github.com/acpica/acpica/commit/649eb441 Link: https://bugs.acpica.org/show_bug.cgi?id=1292 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>
-rw-r--r--drivers/acpi/acpica/dbfileio.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/drivers/acpi/acpica/dbfileio.c b/drivers/acpi/acpica/dbfileio.c
index 483287942372..6f05b8c271a5 100644
--- a/drivers/acpi/acpica/dbfileio.c
+++ b/drivers/acpi/acpica/dbfileio.c
@@ -46,14 +46,12 @@
46#include "accommon.h" 46#include "accommon.h"
47#include "acdebug.h" 47#include "acdebug.h"
48#include "actables.h" 48#include "actables.h"
49#include <stdio.h>
50#ifdef ACPI_APPLICATION
51#include "acapps.h"
52#endif
53 49
54#define _COMPONENT ACPI_CA_DEBUGGER 50#define _COMPONENT ACPI_CA_DEBUGGER
55ACPI_MODULE_NAME("dbfileio") 51ACPI_MODULE_NAME("dbfileio")
56 52
53#ifdef ACPI_APPLICATION
54#include "acapps.h"
57#ifdef ACPI_DEBUGGER 55#ifdef ACPI_DEBUGGER
58/******************************************************************************* 56/*******************************************************************************
59 * 57 *
@@ -69,8 +67,6 @@ ACPI_MODULE_NAME("dbfileio")
69void acpi_db_close_debug_file(void) 67void acpi_db_close_debug_file(void)
70{ 68{
71 69
72#ifdef ACPI_APPLICATION
73
74 if (acpi_gbl_debug_file) { 70 if (acpi_gbl_debug_file) {
75 fclose(acpi_gbl_debug_file); 71 fclose(acpi_gbl_debug_file);
76 acpi_gbl_debug_file = NULL; 72 acpi_gbl_debug_file = NULL;
@@ -78,7 +74,6 @@ void acpi_db_close_debug_file(void)
78 acpi_os_printf("Debug output file %s closed\n", 74 acpi_os_printf("Debug output file %s closed\n",
79 acpi_gbl_db_debug_filename); 75 acpi_gbl_db_debug_filename);
80 } 76 }
81#endif
82} 77}
83 78
84/******************************************************************************* 79/*******************************************************************************
@@ -96,8 +91,6 @@ void acpi_db_close_debug_file(void)
96void acpi_db_open_debug_file(char *name) 91void acpi_db_open_debug_file(char *name)
97{ 92{
98 93
99#ifdef ACPI_APPLICATION
100
101 acpi_db_close_debug_file(); 94 acpi_db_close_debug_file();
102 acpi_gbl_debug_file = fopen(name, "w+"); 95 acpi_gbl_debug_file = fopen(name, "w+");
103 if (!acpi_gbl_debug_file) { 96 if (!acpi_gbl_debug_file) {
@@ -109,8 +102,6 @@ void acpi_db_open_debug_file(char *name)
109 strncpy(acpi_gbl_db_debug_filename, name, 102 strncpy(acpi_gbl_db_debug_filename, name,
110 sizeof(acpi_gbl_db_debug_filename)); 103 sizeof(acpi_gbl_db_debug_filename));
111 acpi_gbl_db_output_to_file = TRUE; 104 acpi_gbl_db_output_to_file = TRUE;
112
113#endif
114} 105}
115#endif 106#endif
116 107
@@ -152,12 +143,13 @@ acpi_status acpi_db_load_tables(struct acpi_new_table_desc *list_head)
152 return (status); 143 return (status);
153 } 144 }
154 145
155 fprintf(stderr, 146 acpi_os_printf
156 "Acpi table [%4.4s] successfully installed and loaded\n", 147 ("Acpi table [%4.4s] successfully installed and loaded\n",
157 table->signature); 148 table->signature);
158 149
159 table_list_head = table_list_head->next; 150 table_list_head = table_list_head->next;
160 } 151 }
161 152
162 return (AE_OK); 153 return (AE_OK);
163} 154}
155#endif