aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLin Ming <ming.m.lin@intel.com>2008-08-07 23:57:11 -0400
committerLen Brown <len.brown@intel.com>2008-10-22 17:56:40 -0400
commit08237974af22a97da59869979ef1a515524d5cc3 (patch)
tree1d0ac70ff4fa3bcb6852020fe24c554ae79e2cf5
parent36eec5e29cf31011a7fbe121badfed7efb2a4ebb (diff)
ACPI: replace AE_BAD_ADDRESS exception code with AE_ERROR
The AE_BAD_ADDRESS exception code is now unused in ACPICA. For linux, it's only used at wmi.c and acer-wmi.c. I checked both wmi.c and acer-wmi.c, the AE_BAD_ADDRESS exception code has no special meaning. The parent functions just call AE_SUCCESS() or AE_FAILURE() to check the return status. So it's safe to replace AE_BAD_ADDRESS with AE_ERROR. Signed-off-by Lin Ming <ming.m.lin@intel.com> Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
-rw-r--r--drivers/acpi/wmi.c10
-rw-r--r--drivers/misc/acer-wmi.c10
2 files changed, 10 insertions, 10 deletions
diff --git a/drivers/acpi/wmi.c b/drivers/acpi/wmi.c
index cfe2c833474d..5b94be38861f 100644
--- a/drivers/acpi/wmi.c
+++ b/drivers/acpi/wmi.c
@@ -242,7 +242,7 @@ u32 method_id, const struct acpi_buffer *in, struct acpi_buffer *out)
242 char method[4] = "WM"; 242 char method[4] = "WM";
243 243
244 if (!find_guid(guid_string, &wblock)) 244 if (!find_guid(guid_string, &wblock))
245 return AE_BAD_ADDRESS; 245 return AE_ERROR;
246 246
247 block = &wblock->gblock; 247 block = &wblock->gblock;
248 handle = wblock->handle; 248 handle = wblock->handle;
@@ -304,7 +304,7 @@ struct acpi_buffer *out)
304 return AE_BAD_PARAMETER; 304 return AE_BAD_PARAMETER;
305 305
306 if (!find_guid(guid_string, &wblock)) 306 if (!find_guid(guid_string, &wblock))
307 return AE_BAD_ADDRESS; 307 return AE_ERROR;
308 308
309 block = &wblock->gblock; 309 block = &wblock->gblock;
310 handle = wblock->handle; 310 handle = wblock->handle;
@@ -314,7 +314,7 @@ struct acpi_buffer *out)
314 314
315 /* Check GUID is a data block */ 315 /* Check GUID is a data block */
316 if (block->flags & (ACPI_WMI_EVENT | ACPI_WMI_METHOD)) 316 if (block->flags & (ACPI_WMI_EVENT | ACPI_WMI_METHOD))
317 return AE_BAD_ADDRESS; 317 return AE_ERROR;
318 318
319 input.count = 1; 319 input.count = 1;
320 input.pointer = wq_params; 320 input.pointer = wq_params;
@@ -385,7 +385,7 @@ const struct acpi_buffer *in)
385 return AE_BAD_DATA; 385 return AE_BAD_DATA;
386 386
387 if (!find_guid(guid_string, &wblock)) 387 if (!find_guid(guid_string, &wblock))
388 return AE_BAD_ADDRESS; 388 return AE_ERROR;
389 389
390 block = &wblock->gblock; 390 block = &wblock->gblock;
391 handle = wblock->handle; 391 handle = wblock->handle;
@@ -395,7 +395,7 @@ const struct acpi_buffer *in)
395 395
396 /* Check GUID is a data block */ 396 /* Check GUID is a data block */
397 if (block->flags & (ACPI_WMI_EVENT | ACPI_WMI_METHOD)) 397 if (block->flags & (ACPI_WMI_EVENT | ACPI_WMI_METHOD))
398 return AE_BAD_ADDRESS; 398 return AE_ERROR;
399 399
400 input.count = 2; 400 input.count = 2;
401 input.pointer = params; 401 input.pointer = params;
diff --git a/drivers/misc/acer-wmi.c b/drivers/misc/acer-wmi.c
index d8b0d326e452..a67aef5e284c 100644
--- a/drivers/misc/acer-wmi.c
+++ b/drivers/misc/acer-wmi.c
@@ -476,7 +476,7 @@ struct wmi_interface *iface)
476 } 476 }
477 break; 477 break;
478 default: 478 default:
479 return AE_BAD_ADDRESS; 479 return AE_ERROR;
480 } 480 }
481 return AE_OK; 481 return AE_OK;
482} 482}
@@ -514,7 +514,7 @@ static acpi_status AMW0_set_u32(u32 value, u32 cap, struct wmi_interface *iface)
514 break; 514 break;
515 } 515 }
516 default: 516 default:
517 return AE_BAD_ADDRESS; 517 return AE_ERROR;
518 } 518 }
519 519
520 /* Actually do the set */ 520 /* Actually do the set */
@@ -689,7 +689,7 @@ struct wmi_interface *iface)
689 return 0; 689 return 0;
690 } 690 }
691 default: 691 default:
692 return AE_BAD_ADDRESS; 692 return AE_ERROR;
693 } 693 }
694 status = WMI_execute_u32(method_id, 0, &result); 694 status = WMI_execute_u32(method_id, 0, &result);
695 695
@@ -735,7 +735,7 @@ static acpi_status WMID_set_u32(u32 value, u32 cap, struct wmi_interface *iface)
735 } 735 }
736 break; 736 break;
737 default: 737 default:
738 return AE_BAD_ADDRESS; 738 return AE_ERROR;
739 } 739 }
740 return WMI_execute_u32(method_id, (u32)value, NULL); 740 return WMI_execute_u32(method_id, (u32)value, NULL);
741} 741}
@@ -785,7 +785,7 @@ static struct wmi_interface wmid_interface = {
785 785
786static acpi_status get_u32(u32 *value, u32 cap) 786static acpi_status get_u32(u32 *value, u32 cap)
787{ 787{
788 acpi_status status = AE_BAD_ADDRESS; 788 acpi_status status = AE_ERROR;
789 789
790 switch (interface->type) { 790 switch (interface->type) {
791 case ACER_AMW0: 791 case ACER_AMW0: