lkml.org 
[lkml]   [2008]   [Dec]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH for mmotm1230] acpi: fix unused variable warnings
Patch against: mmotm 1230
Applied after: linux-next.patch
==
Recently, added ifdef ACPI_20_GTS_BFS, then related variable declaration
also move into it.


Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
---
drivers/acpi/hardware/hwsleep.c | 48 ++++++++++++++++++++++------------------
1 file changed, 27 insertions(+), 21 deletions(-)

Index: b/drivers/acpi/hardware/hwsleep.c
===================================================================
--- a/drivers/acpi/hardware/hwsleep.c 2008-12-31 14:22:33.000000000 +0900
+++ b/drivers/acpi/hardware/hwsleep.c 2008-12-31 14:52:40.000000000 +0900
@@ -227,8 +227,6 @@ acpi_status asmlinkage acpi_enter_sleep_
struct acpi_bit_register_info *sleep_type_reg_info;
struct acpi_bit_register_info *sleep_enable_reg_info;
u32 in_value;
- struct acpi_object_list arg_list;
- union acpi_object arg;
acpi_status status;

ACPI_FUNCTION_TRACE(acpi_enter_sleep_state);
@@ -277,14 +275,19 @@ acpi_status asmlinkage acpi_enter_sleep_
#ifdef ACPI_20_GTS_BFS
/* Execute the _GTS method */

- arg_list.count = 1;
- arg_list.pointer = &arg;
- arg.type = ACPI_TYPE_INTEGER;
- arg.integer.value = sleep_state;
-
- status = acpi_evaluate_object(NULL, METHOD_NAME__GTS, &arg_list, NULL);
- if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) {
- return_ACPI_STATUS(status);
+ {
+ struct acpi_object_list arg_list;
+ union acpi_object arg;
+
+ arg_list.count = 1;
+ arg_list.pointer = &arg;
+ arg.type = ACPI_TYPE_INTEGER;
+ arg.integer.value = sleep_state;
+
+ status = acpi_evaluate_object(NULL, METHOD_NAME__GTS,
+ &arg_list, NULL);
+ if (ACPI_FAILURE(status) && status != AE_NOT_FOUND)
+ return_ACPI_STATUS(status);
}
#endif

@@ -467,8 +470,6 @@ ACPI_EXPORT_SYMBOL(acpi_enter_sleep_stat
******************************************************************************/
acpi_status acpi_leave_sleep_state_prep(u8 sleep_state)
{
- struct acpi_object_list arg_list;
- union acpi_object arg;
acpi_status status;
struct acpi_bit_register_info *sleep_type_reg_info;
struct acpi_bit_register_info *sleep_enable_reg_info;
@@ -524,15 +525,20 @@ acpi_status acpi_leave_sleep_state_prep(

#ifdef ACPI_20_GTS_BFS
/* Execute the _BFS method */
-
- arg_list.count = 1;
- arg_list.pointer = &arg;
- arg.type = ACPI_TYPE_INTEGER;
- arg.integer.value = sleep_state;
-
- status = acpi_evaluate_object(NULL, METHOD_NAME__BFS, &arg_list, NULL);
- if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) {
- ACPI_EXCEPTION((AE_INFO, status, "During Method _BFS"));
+ {
+ struct acpi_object_list arg_list;
+ union acpi_object arg;
+
+ arg_list.count = 1;
+ arg_list.pointer = &arg;
+ arg.type = ACPI_TYPE_INTEGER;
+ arg.integer.value = sleep_state;
+
+ status = acpi_evaluate_object(NULL, METHOD_NAME__BFS,
+ &arg_list, NULL);
+ if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) {
+ ACPI_EXCEPTION((AE_INFO, status, "During Method _BFS"));
+ }
}
#endif





\
 
 \ /
  Last update: 2008-12-31 15:45    [W:0.056 / U:0.824 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site