diff options
author | Lin Ming <ming.m.lin@intel.com> | 2010-12-13 00:36:15 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2011-01-12 04:24:40 -0500 |
commit | 3a37898d507794cfc68a092303e02651d3f01308 (patch) | |
tree | e3a53e7746a5a69000553814d8f07fa51b99ab45 /drivers/acpi/acpica | |
parent | 3cfd53d53f700a225716294842b1a843326dea21 (diff) |
ACPICA: Rename some function and variable names
Some function and variable names are renamed to be consistent with
ACPICA code base.
acpi_raw_enable_gpe -> acpi_ev_add_gpe_reference
acpi_raw_disable_gpe -> acpi_ev_remove_gpe_reference
acpi_gpe_can_wake -> acpi_setup_gpe_for_wake
acpi_gpe_wakeup -> acpi_set_gpe_wake_mask
acpi_update_gpes -> acpi_update_all_gpes
acpi_all_gpes_initialized -> acpi_gbl_all_gpes_initialized
acpi_handler_info -> acpi_gpe_handler_info
...
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/acpica')
-rw-r--r-- | drivers/acpi/acpica/acevents.h | 6 | ||||
-rw-r--r-- | drivers/acpi/acpica/acglobal.h | 2 | ||||
-rw-r--r-- | drivers/acpi/acpica/aclocal.h | 8 | ||||
-rw-r--r-- | drivers/acpi/acpica/evgpe.c | 14 | ||||
-rw-r--r-- | drivers/acpi/acpica/evgpeblk.c | 4 | ||||
-rw-r--r-- | drivers/acpi/acpica/evxface.c | 16 | ||||
-rw-r--r-- | drivers/acpi/acpica/evxfgpe.c | 53 | ||||
-rw-r--r-- | drivers/acpi/acpica/hwgpe.c | 2 | ||||
-rw-r--r-- | drivers/acpi/acpica/utglobal.c | 2 |
9 files changed, 62 insertions, 45 deletions
diff --git a/drivers/acpi/acpica/acevents.h b/drivers/acpi/acpica/acevents.h index 43f15c8cd2b2..ce2af07f62b3 100644 --- a/drivers/acpi/acpica/acevents.h +++ b/drivers/acpi/acpica/acevents.h | |||
@@ -82,9 +82,9 @@ acpi_ev_update_gpe_enable_mask(struct acpi_gpe_event_info *gpe_event_info); | |||
82 | 82 | ||
83 | acpi_status acpi_ev_enable_gpe(struct acpi_gpe_event_info *gpe_event_info); | 83 | acpi_status acpi_ev_enable_gpe(struct acpi_gpe_event_info *gpe_event_info); |
84 | 84 | ||
85 | acpi_status acpi_raw_enable_gpe(struct acpi_gpe_event_info *gpe_event_info); | 85 | acpi_status acpi_ev_add_gpe_reference(struct acpi_gpe_event_info *gpe_event_info); |
86 | 86 | ||
87 | acpi_status acpi_raw_disable_gpe(struct acpi_gpe_event_info *gpe_event_info); | 87 | acpi_status acpi_ev_remove_gpe_reference(struct acpi_gpe_event_info *gpe_event_info); |
88 | 88 | ||
89 | struct acpi_gpe_event_info *acpi_ev_get_gpe_event_info(acpi_handle gpe_device, | 89 | struct acpi_gpe_event_info *acpi_ev_get_gpe_event_info(acpi_handle gpe_device, |
90 | u32 gpe_number); | 90 | u32 gpe_number); |
@@ -107,7 +107,7 @@ acpi_ev_create_gpe_block(struct acpi_namespace_node *gpe_device, | |||
107 | acpi_status | 107 | acpi_status |
108 | acpi_ev_initialize_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info, | 108 | acpi_ev_initialize_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info, |
109 | struct acpi_gpe_block_info *gpe_block, | 109 | struct acpi_gpe_block_info *gpe_block, |
110 | void *ignored); | 110 | void *context); |
111 | 111 | ||
112 | acpi_status acpi_ev_delete_gpe_block(struct acpi_gpe_block_info *gpe_block); | 112 | acpi_status acpi_ev_delete_gpe_block(struct acpi_gpe_block_info *gpe_block); |
113 | 113 | ||
diff --git a/drivers/acpi/acpica/acglobal.h b/drivers/acpi/acpica/acglobal.h index ad88fcae4eb9..fc694647699f 100644 --- a/drivers/acpi/acpica/acglobal.h +++ b/drivers/acpi/acpica/acglobal.h | |||
@@ -370,7 +370,7 @@ ACPI_EXTERN struct acpi_fixed_event_handler | |||
370 | ACPI_EXTERN struct acpi_gpe_xrupt_info *acpi_gbl_gpe_xrupt_list_head; | 370 | ACPI_EXTERN struct acpi_gpe_xrupt_info *acpi_gbl_gpe_xrupt_list_head; |
371 | ACPI_EXTERN struct acpi_gpe_block_info | 371 | ACPI_EXTERN struct acpi_gpe_block_info |
372 | *acpi_gbl_gpe_fadt_blocks[ACPI_MAX_GPE_BLOCKS]; | 372 | *acpi_gbl_gpe_fadt_blocks[ACPI_MAX_GPE_BLOCKS]; |
373 | ACPI_EXTERN u8 acpi_all_gpes_initialized; | 373 | ACPI_EXTERN u8 acpi_gbl_all_gpes_initialized; |
374 | 374 | ||
375 | /***************************************************************************** | 375 | /***************************************************************************** |
376 | * | 376 | * |
diff --git a/drivers/acpi/acpica/aclocal.h b/drivers/acpi/acpica/aclocal.h index 2ceb0c05b2d7..2f841d019a3a 100644 --- a/drivers/acpi/acpica/aclocal.h +++ b/drivers/acpi/acpica/aclocal.h | |||
@@ -412,13 +412,13 @@ struct acpi_handler_info { | |||
412 | acpi_event_handler address; /* Address of handler, if any */ | 412 | acpi_event_handler address; /* Address of handler, if any */ |
413 | void *context; /* Context to be passed to handler */ | 413 | void *context; /* Context to be passed to handler */ |
414 | struct acpi_namespace_node *method_node; /* Method node for this GPE level (saved) */ | 414 | struct acpi_namespace_node *method_node; /* Method node for this GPE level (saved) */ |
415 | u8 orig_flags; /* Original misc info about this GPE */ | 415 | u8 original_flags; /* Original (pre-handler) GPE info */ |
416 | u8 orig_enabled; /* Set if the GPE was originally enabled */ | 416 | u8 originally_enabled; /* True if GPE was originally enabled */ |
417 | }; | 417 | }; |
418 | 418 | ||
419 | union acpi_gpe_dispatch_info { | 419 | union acpi_gpe_dispatch_info { |
420 | struct acpi_namespace_node *method_node; /* Method node for this GPE level */ | 420 | struct acpi_namespace_node *method_node; /* Method node for this GPE level */ |
421 | struct acpi_handler_info *handler; | 421 | struct acpi_handler_info *handler; /* Installed GPE handler */ |
422 | }; | 422 | }; |
423 | 423 | ||
424 | /* | 424 | /* |
@@ -458,7 +458,7 @@ struct acpi_gpe_block_info { | |||
458 | u32 register_count; /* Number of register pairs in block */ | 458 | u32 register_count; /* Number of register pairs in block */ |
459 | u16 gpe_count; /* Number of individual GPEs in block */ | 459 | u16 gpe_count; /* Number of individual GPEs in block */ |
460 | u8 block_base_number; /* Base GPE number for this block */ | 460 | u8 block_base_number; /* Base GPE number for this block */ |
461 | u8 initialized; /* If set, the GPE block has been initialized */ | 461 | u8 initialized; /* TRUE if this block is initialized */ |
462 | }; | 462 | }; |
463 | 463 | ||
464 | /* Information about GPE interrupt handlers, one per each interrupt level used for GPEs */ | 464 | /* Information about GPE interrupt handlers, one per each interrupt level used for GPEs */ |
diff --git a/drivers/acpi/acpica/evgpe.c b/drivers/acpi/acpica/evgpe.c index f226eac314db..005c170d2448 100644 --- a/drivers/acpi/acpica/evgpe.c +++ b/drivers/acpi/acpica/evgpe.c | |||
@@ -137,7 +137,7 @@ acpi_ev_enable_gpe(struct acpi_gpe_event_info *gpe_event_info) | |||
137 | 137 | ||
138 | /******************************************************************************* | 138 | /******************************************************************************* |
139 | * | 139 | * |
140 | * FUNCTION: acpi_raw_enable_gpe | 140 | * FUNCTION: acpi_ev_add_gpe_reference |
141 | * | 141 | * |
142 | * PARAMETERS: gpe_event_info - GPE to enable | 142 | * PARAMETERS: gpe_event_info - GPE to enable |
143 | * | 143 | * |
@@ -148,10 +148,12 @@ acpi_ev_enable_gpe(struct acpi_gpe_event_info *gpe_event_info) | |||
148 | * | 148 | * |
149 | ******************************************************************************/ | 149 | ******************************************************************************/ |
150 | 150 | ||
151 | acpi_status acpi_raw_enable_gpe(struct acpi_gpe_event_info *gpe_event_info) | 151 | acpi_status acpi_ev_add_gpe_reference(struct acpi_gpe_event_info *gpe_event_info) |
152 | { | 152 | { |
153 | acpi_status status = AE_OK; | 153 | acpi_status status = AE_OK; |
154 | 154 | ||
155 | ACPI_FUNCTION_TRACE(ev_add_gpe_reference); | ||
156 | |||
155 | if (gpe_event_info->runtime_count == ACPI_UINT8_MAX) { | 157 | if (gpe_event_info->runtime_count == ACPI_UINT8_MAX) { |
156 | return_ACPI_STATUS(AE_LIMIT); | 158 | return_ACPI_STATUS(AE_LIMIT); |
157 | } | 159 | } |
@@ -173,7 +175,7 @@ acpi_status acpi_raw_enable_gpe(struct acpi_gpe_event_info *gpe_event_info) | |||
173 | 175 | ||
174 | /******************************************************************************* | 176 | /******************************************************************************* |
175 | * | 177 | * |
176 | * FUNCTION: acpi_raw_disable_gpe | 178 | * FUNCTION: acpi_ev_remove_gpe_reference |
177 | * | 179 | * |
178 | * PARAMETERS: gpe_event_info - GPE to disable | 180 | * PARAMETERS: gpe_event_info - GPE to disable |
179 | * | 181 | * |
@@ -184,10 +186,12 @@ acpi_status acpi_raw_enable_gpe(struct acpi_gpe_event_info *gpe_event_info) | |||
184 | * | 186 | * |
185 | ******************************************************************************/ | 187 | ******************************************************************************/ |
186 | 188 | ||
187 | acpi_status acpi_raw_disable_gpe(struct acpi_gpe_event_info *gpe_event_info) | 189 | acpi_status acpi_ev_remove_gpe_reference(struct acpi_gpe_event_info *gpe_event_info) |
188 | { | 190 | { |
189 | acpi_status status = AE_OK; | 191 | acpi_status status = AE_OK; |
190 | 192 | ||
193 | ACPI_FUNCTION_TRACE(ev_remove_gpe_reference); | ||
194 | |||
191 | if (!gpe_event_info->runtime_count) { | 195 | if (!gpe_event_info->runtime_count) { |
192 | return_ACPI_STATUS(AE_LIMIT); | 196 | return_ACPI_STATUS(AE_LIMIT); |
193 | } | 197 | } |
@@ -529,7 +533,7 @@ static void acpi_ev_asynch_enable_gpe(void *context) | |||
529 | * Enable this GPE, conditionally. This means that the GPE will only be | 533 | * Enable this GPE, conditionally. This means that the GPE will only be |
530 | * physically enabled if the enable_for_run bit is set in the event_info | 534 | * physically enabled if the enable_for_run bit is set in the event_info |
531 | */ | 535 | */ |
532 | (void)acpi_hw_low_set_gpe(gpe_event_info, ACPI_GPE_COND_ENABLE); | 536 | (void)acpi_hw_low_set_gpe(gpe_event_info, ACPI_GPE_CONDITIONAL_ENABLE); |
533 | 537 | ||
534 | return_VOID; | 538 | return_VOID; |
535 | } | 539 | } |
diff --git a/drivers/acpi/acpica/evgpeblk.c b/drivers/acpi/acpica/evgpeblk.c index 020add3eee1c..2a445dfcfdb4 100644 --- a/drivers/acpi/acpica/evgpeblk.c +++ b/drivers/acpi/acpica/evgpeblk.c | |||
@@ -386,7 +386,7 @@ acpi_ev_create_gpe_block(struct acpi_namespace_node *gpe_device, | |||
386 | return_ACPI_STATUS(status); | 386 | return_ACPI_STATUS(status); |
387 | } | 387 | } |
388 | 388 | ||
389 | acpi_all_gpes_initialized = FALSE; | 389 | acpi_gbl_all_gpes_initialized = FALSE; |
390 | 390 | ||
391 | /* Find all GPE methods (_Lxx or_Exx) for this block */ | 391 | /* Find all GPE methods (_Lxx or_Exx) for this block */ |
392 | 392 | ||
@@ -479,7 +479,7 @@ acpi_ev_initialize_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info, | |||
479 | continue; | 479 | continue; |
480 | } | 480 | } |
481 | 481 | ||
482 | status = acpi_raw_enable_gpe(gpe_event_info); | 482 | status = acpi_ev_add_gpe_reference(gpe_event_info); |
483 | if (ACPI_FAILURE(status)) { | 483 | if (ACPI_FAILURE(status)) { |
484 | ACPI_EXCEPTION((AE_INFO, status, | 484 | ACPI_EXCEPTION((AE_INFO, status, |
485 | "Could not enable GPE 0x%02X", | 485 | "Could not enable GPE 0x%02X", |
diff --git a/drivers/acpi/acpica/evxface.c b/drivers/acpi/acpica/evxface.c index 36af222cac65..042a6d69f38e 100644 --- a/drivers/acpi/acpica/evxface.c +++ b/drivers/acpi/acpica/evxface.c | |||
@@ -722,7 +722,7 @@ acpi_install_gpe_handler(acpi_handle gpe_device, | |||
722 | handler->address = address; | 722 | handler->address = address; |
723 | handler->context = context; | 723 | handler->context = context; |
724 | handler->method_node = gpe_event_info->dispatch.method_node; | 724 | handler->method_node = gpe_event_info->dispatch.method_node; |
725 | handler->orig_flags = gpe_event_info->flags & | 725 | handler->original_flags = gpe_event_info->flags & |
726 | (ACPI_GPE_XRUPT_TYPE_MASK | ACPI_GPE_DISPATCH_MASK); | 726 | (ACPI_GPE_XRUPT_TYPE_MASK | ACPI_GPE_DISPATCH_MASK); |
727 | 727 | ||
728 | /* | 728 | /* |
@@ -731,10 +731,10 @@ acpi_install_gpe_handler(acpi_handle gpe_device, | |||
731 | * disabled now to avoid spurious execution of the handler. | 731 | * disabled now to avoid spurious execution of the handler. |
732 | */ | 732 | */ |
733 | 733 | ||
734 | if ((handler->orig_flags & ACPI_GPE_DISPATCH_METHOD) | 734 | if ((handler->original_flags & ACPI_GPE_DISPATCH_METHOD) |
735 | && gpe_event_info->runtime_count) { | 735 | && gpe_event_info->runtime_count) { |
736 | handler->orig_enabled = 1; | 736 | handler->originally_enabled = 1; |
737 | (void)acpi_raw_disable_gpe(gpe_event_info); | 737 | (void)acpi_ev_remove_gpe_reference(gpe_event_info); |
738 | } | 738 | } |
739 | 739 | ||
740 | /* Install the handler */ | 740 | /* Install the handler */ |
@@ -835,7 +835,7 @@ acpi_remove_gpe_handler(acpi_handle gpe_device, | |||
835 | gpe_event_info->dispatch.method_node = handler->method_node; | 835 | gpe_event_info->dispatch.method_node = handler->method_node; |
836 | gpe_event_info->flags &= | 836 | gpe_event_info->flags &= |
837 | ~(ACPI_GPE_XRUPT_TYPE_MASK | ACPI_GPE_DISPATCH_MASK); | 837 | ~(ACPI_GPE_XRUPT_TYPE_MASK | ACPI_GPE_DISPATCH_MASK); |
838 | gpe_event_info->flags |= handler->orig_flags; | 838 | gpe_event_info->flags |= handler->original_flags; |
839 | 839 | ||
840 | /* | 840 | /* |
841 | * If the GPE was previously associated with a method and it was | 841 | * If the GPE was previously associated with a method and it was |
@@ -843,9 +843,9 @@ acpi_remove_gpe_handler(acpi_handle gpe_device, | |||
843 | * post-initialization configuration. | 843 | * post-initialization configuration. |
844 | */ | 844 | */ |
845 | 845 | ||
846 | if ((handler->orig_flags & ACPI_GPE_DISPATCH_METHOD) | 846 | if ((handler->original_flags & ACPI_GPE_DISPATCH_METHOD) |
847 | && handler->orig_enabled) | 847 | && handler->originally_enabled) |
848 | (void)acpi_raw_enable_gpe(gpe_event_info); | 848 | (void)acpi_ev_add_gpe_reference(gpe_event_info); |
849 | 849 | ||
850 | /* Now we can free the handler object */ | 850 | /* Now we can free the handler object */ |
851 | 851 | ||
diff --git a/drivers/acpi/acpica/evxfgpe.c b/drivers/acpi/acpica/evxfgpe.c index 8068065d90eb..99f77ab29729 100644 --- a/drivers/acpi/acpica/evxfgpe.c +++ b/drivers/acpi/acpica/evxfgpe.c | |||
@@ -51,7 +51,7 @@ ACPI_MODULE_NAME("evxfgpe") | |||
51 | 51 | ||
52 | /****************************************************************************** | 52 | /****************************************************************************** |
53 | * | 53 | * |
54 | * FUNCTION: acpi_update_gpes | 54 | * FUNCTION: acpi_update_all_gpes |
55 | * | 55 | * |
56 | * PARAMETERS: None | 56 | * PARAMETERS: None |
57 | * | 57 | * |
@@ -65,30 +65,34 @@ ACPI_MODULE_NAME("evxfgpe") | |||
65 | * | 65 | * |
66 | ******************************************************************************/ | 66 | ******************************************************************************/ |
67 | 67 | ||
68 | acpi_status acpi_update_gpes(void) | 68 | acpi_status acpi_update_all_gpes(void) |
69 | { | 69 | { |
70 | acpi_status status; | 70 | acpi_status status; |
71 | 71 | ||
72 | ACPI_FUNCTION_TRACE(acpi_update_gpes); | 72 | ACPI_FUNCTION_TRACE(acpi_update_all_gpes); |
73 | 73 | ||
74 | status = acpi_ut_acquire_mutex(ACPI_MTX_EVENTS); | 74 | status = acpi_ut_acquire_mutex(ACPI_MTX_EVENTS); |
75 | if (ACPI_FAILURE(status)) { | 75 | if (ACPI_FAILURE(status)) { |
76 | return_ACPI_STATUS(status); | 76 | return_ACPI_STATUS(status); |
77 | } else if (acpi_all_gpes_initialized) { | 77 | } |
78 | goto unlock; | 78 | |
79 | if (acpi_gbl_all_gpes_initialized) { | ||
80 | goto unlock_and_exit; | ||
79 | } | 81 | } |
80 | 82 | ||
81 | status = acpi_ev_walk_gpe_list(acpi_ev_initialize_gpe_block, NULL); | 83 | status = acpi_ev_walk_gpe_list(acpi_ev_initialize_gpe_block, NULL); |
82 | if (ACPI_SUCCESS(status)) { | 84 | if (ACPI_SUCCESS(status)) { |
83 | acpi_all_gpes_initialized = TRUE; | 85 | acpi_gbl_all_gpes_initialized = TRUE; |
84 | } | 86 | } |
85 | 87 | ||
86 | unlock: | 88 | unlock_and_exit: |
87 | (void)acpi_ut_release_mutex(ACPI_MTX_EVENTS); | 89 | (void)acpi_ut_release_mutex(ACPI_MTX_EVENTS); |
88 | 90 | ||
89 | return_ACPI_STATUS(status); | 91 | return_ACPI_STATUS(status); |
90 | } | 92 | } |
91 | 93 | ||
94 | ACPI_EXPORT_SYMBOL(acpi_update_all_gpes) | ||
95 | |||
92 | /******************************************************************************* | 96 | /******************************************************************************* |
93 | * | 97 | * |
94 | * FUNCTION: acpi_enable_gpe | 98 | * FUNCTION: acpi_enable_gpe |
@@ -117,7 +121,7 @@ acpi_status acpi_enable_gpe(acpi_handle gpe_device, u32 gpe_number) | |||
117 | 121 | ||
118 | gpe_event_info = acpi_ev_get_gpe_event_info(gpe_device, gpe_number); | 122 | gpe_event_info = acpi_ev_get_gpe_event_info(gpe_device, gpe_number); |
119 | if (gpe_event_info) { | 123 | if (gpe_event_info) { |
120 | status = acpi_raw_enable_gpe(gpe_event_info); | 124 | status = acpi_ev_add_gpe_reference(gpe_event_info); |
121 | } | 125 | } |
122 | 126 | ||
123 | acpi_os_release_lock(acpi_gbl_gpe_lock, flags); | 127 | acpi_os_release_lock(acpi_gbl_gpe_lock, flags); |
@@ -154,7 +158,7 @@ acpi_status acpi_disable_gpe(acpi_handle gpe_device, u32 gpe_number) | |||
154 | 158 | ||
155 | gpe_event_info = acpi_ev_get_gpe_event_info(gpe_device, gpe_number); | 159 | gpe_event_info = acpi_ev_get_gpe_event_info(gpe_device, gpe_number); |
156 | if (gpe_event_info) { | 160 | if (gpe_event_info) { |
157 | status = acpi_raw_disable_gpe(gpe_event_info) ; | 161 | status = acpi_ev_remove_gpe_reference(gpe_event_info) ; |
158 | } | 162 | } |
159 | 163 | ||
160 | acpi_os_release_lock(acpi_gbl_gpe_lock, flags); | 164 | acpi_os_release_lock(acpi_gbl_gpe_lock, flags); |
@@ -164,7 +168,7 @@ ACPI_EXPORT_SYMBOL(acpi_disable_gpe) | |||
164 | 168 | ||
165 | /******************************************************************************* | 169 | /******************************************************************************* |
166 | * | 170 | * |
167 | * FUNCTION: acpi_gpe_can_wake | 171 | * FUNCTION: acpi_setup_gpe_for_wake |
168 | * | 172 | * |
169 | * PARAMETERS: gpe_device - Parent GPE Device. NULL for GPE0/GPE1 | 173 | * PARAMETERS: gpe_device - Parent GPE Device. NULL for GPE0/GPE1 |
170 | * gpe_number - GPE level within the GPE block | 174 | * gpe_number - GPE level within the GPE block |
@@ -178,13 +182,13 @@ ACPI_EXPORT_SYMBOL(acpi_disable_gpe) | |||
178 | * to be initially disabled). | 182 | * to be initially disabled). |
179 | * | 183 | * |
180 | ******************************************************************************/ | 184 | ******************************************************************************/ |
181 | acpi_status acpi_gpe_can_wake(acpi_handle gpe_device, u32 gpe_number) | 185 | acpi_status acpi_setup_gpe_for_wake(acpi_handle gpe_device, u32 gpe_number) |
182 | { | 186 | { |
183 | acpi_status status = AE_OK; | 187 | acpi_status status = AE_OK; |
184 | struct acpi_gpe_event_info *gpe_event_info; | 188 | struct acpi_gpe_event_info *gpe_event_info; |
185 | acpi_cpu_flags flags; | 189 | acpi_cpu_flags flags; |
186 | 190 | ||
187 | ACPI_FUNCTION_TRACE(acpi_gpe_can_wake); | 191 | ACPI_FUNCTION_TRACE(acpi_setup_gpe_for_wake); |
188 | 192 | ||
189 | flags = acpi_os_acquire_lock(acpi_gbl_gpe_lock); | 193 | flags = acpi_os_acquire_lock(acpi_gbl_gpe_lock); |
190 | 194 | ||
@@ -200,11 +204,11 @@ acpi_status acpi_gpe_can_wake(acpi_handle gpe_device, u32 gpe_number) | |||
200 | acpi_os_release_lock(acpi_gbl_gpe_lock, flags); | 204 | acpi_os_release_lock(acpi_gbl_gpe_lock, flags); |
201 | return_ACPI_STATUS(status); | 205 | return_ACPI_STATUS(status); |
202 | } | 206 | } |
203 | ACPI_EXPORT_SYMBOL(acpi_gpe_can_wake) | 207 | ACPI_EXPORT_SYMBOL(acpi_setup_gpe_for_wake) |
204 | 208 | ||
205 | /******************************************************************************* | 209 | /******************************************************************************* |
206 | * | 210 | * |
207 | * FUNCTION: acpi_gpe_wakeup | 211 | * FUNCTION: acpi_set_gpe_wake_mask |
208 | * | 212 | * |
209 | * PARAMETERS: gpe_device - Parent GPE Device. NULL for GPE0/GPE1 | 213 | * PARAMETERS: gpe_device - Parent GPE Device. NULL for GPE0/GPE1 |
210 | * gpe_number - GPE level within the GPE block | 214 | * gpe_number - GPE level within the GPE block |
@@ -216,7 +220,7 @@ ACPI_EXPORT_SYMBOL(acpi_gpe_can_wake) | |||
216 | * | 220 | * |
217 | ******************************************************************************/ | 221 | ******************************************************************************/ |
218 | 222 | ||
219 | acpi_status acpi_gpe_wakeup(acpi_handle gpe_device, u32 gpe_number, u8 action) | 223 | acpi_status acpi_set_gpe_wake_mask(acpi_handle gpe_device, u32 gpe_number, u8 action) |
220 | { | 224 | { |
221 | acpi_status status = AE_OK; | 225 | acpi_status status = AE_OK; |
222 | struct acpi_gpe_event_info *gpe_event_info; | 226 | struct acpi_gpe_event_info *gpe_event_info; |
@@ -224,18 +228,23 @@ acpi_status acpi_gpe_wakeup(acpi_handle gpe_device, u32 gpe_number, u8 action) | |||
224 | acpi_cpu_flags flags; | 228 | acpi_cpu_flags flags; |
225 | u32 register_bit; | 229 | u32 register_bit; |
226 | 230 | ||
227 | ACPI_FUNCTION_TRACE(acpi_gpe_wakeup); | 231 | ACPI_FUNCTION_TRACE(acpi_set_gpe_wake_mask); |
228 | 232 | ||
229 | flags = acpi_os_acquire_lock(acpi_gbl_gpe_lock); | 233 | flags = acpi_os_acquire_lock(acpi_gbl_gpe_lock); |
230 | 234 | ||
231 | /* Ensure that we have a valid GPE number */ | 235 | /* Ensure that we have a valid GPE number */ |
232 | 236 | ||
233 | gpe_event_info = acpi_ev_get_gpe_event_info(gpe_device, gpe_number); | 237 | gpe_event_info = acpi_ev_get_gpe_event_info(gpe_device, gpe_number); |
234 | if (!gpe_event_info || !(gpe_event_info->flags & ACPI_GPE_CAN_WAKE)) { | 238 | if (!gpe_event_info) { |
235 | status = AE_BAD_PARAMETER; | 239 | status = AE_BAD_PARAMETER; |
236 | goto unlock_and_exit; | 240 | goto unlock_and_exit; |
237 | } | 241 | } |
238 | 242 | ||
243 | if (!(gpe_event_info->flags & ACPI_GPE_CAN_WAKE)) { | ||
244 | status = AE_TYPE; | ||
245 | goto unlock_and_exit; | ||
246 | } | ||
247 | |||
239 | gpe_register_info = gpe_event_info->register_info; | 248 | gpe_register_info = gpe_event_info->register_info; |
240 | if (!gpe_register_info) { | 249 | if (!gpe_register_info) { |
241 | status = AE_NOT_EXIST; | 250 | status = AE_NOT_EXIST; |
@@ -269,7 +278,7 @@ unlock_and_exit: | |||
269 | return_ACPI_STATUS(status); | 278 | return_ACPI_STATUS(status); |
270 | } | 279 | } |
271 | 280 | ||
272 | ACPI_EXPORT_SYMBOL(acpi_gpe_wakeup) | 281 | ACPI_EXPORT_SYMBOL(acpi_set_gpe_wake_mask) |
273 | 282 | ||
274 | /******************************************************************************* | 283 | /******************************************************************************* |
275 | * | 284 | * |
@@ -387,6 +396,8 @@ acpi_status acpi_disable_all_gpes(void) | |||
387 | return_ACPI_STATUS(status); | 396 | return_ACPI_STATUS(status); |
388 | } | 397 | } |
389 | 398 | ||
399 | ACPI_EXPORT_SYMBOL(acpi_disable_all_gpes) | ||
400 | |||
390 | /****************************************************************************** | 401 | /****************************************************************************** |
391 | * | 402 | * |
392 | * FUNCTION: acpi_enable_all_runtime_gpes | 403 | * FUNCTION: acpi_enable_all_runtime_gpes |
@@ -416,6 +427,8 @@ acpi_status acpi_enable_all_runtime_gpes(void) | |||
416 | return_ACPI_STATUS(status); | 427 | return_ACPI_STATUS(status); |
417 | } | 428 | } |
418 | 429 | ||
430 | ACPI_EXPORT_SYMBOL(acpi_enable_all_runtime_gpes) | ||
431 | |||
419 | /******************************************************************************* | 432 | /******************************************************************************* |
420 | * | 433 | * |
421 | * FUNCTION: acpi_install_gpe_block | 434 | * FUNCTION: acpi_install_gpe_block |
@@ -435,7 +448,7 @@ acpi_install_gpe_block(acpi_handle gpe_device, | |||
435 | struct acpi_generic_address *gpe_block_address, | 448 | struct acpi_generic_address *gpe_block_address, |
436 | u32 register_count, u32 interrupt_number) | 449 | u32 register_count, u32 interrupt_number) |
437 | { | 450 | { |
438 | acpi_status status = AE_OK; | 451 | acpi_status status; |
439 | union acpi_operand_object *obj_desc; | 452 | union acpi_operand_object *obj_desc; |
440 | struct acpi_namespace_node *node; | 453 | struct acpi_namespace_node *node; |
441 | struct acpi_gpe_block_info *gpe_block; | 454 | struct acpi_gpe_block_info *gpe_block; |
@@ -603,7 +616,7 @@ acpi_get_gpe_device(u32 index, acpi_handle *gpe_device) | |||
603 | return_ACPI_STATUS(status); | 616 | return_ACPI_STATUS(status); |
604 | } | 617 | } |
605 | 618 | ||
606 | *gpe_device = info.gpe_device; | 619 | *gpe_device = ACPI_CAST_PTR(acpi_handle, info.gpe_device); |
607 | return_ACPI_STATUS(info.status); | 620 | return_ACPI_STATUS(info.status); |
608 | } | 621 | } |
609 | 622 | ||
diff --git a/drivers/acpi/acpica/hwgpe.c b/drivers/acpi/acpica/hwgpe.c index 14750db2a1b8..7c6d4858bb49 100644 --- a/drivers/acpi/acpica/hwgpe.c +++ b/drivers/acpi/acpica/hwgpe.c | |||
@@ -118,7 +118,7 @@ acpi_hw_low_set_gpe(struct acpi_gpe_event_info *gpe_event_info, u8 action) | |||
118 | register_bit = acpi_hw_get_gpe_register_bit(gpe_event_info, | 118 | register_bit = acpi_hw_get_gpe_register_bit(gpe_event_info, |
119 | gpe_register_info); | 119 | gpe_register_info); |
120 | switch (action) { | 120 | switch (action) { |
121 | case ACPI_GPE_COND_ENABLE: | 121 | case ACPI_GPE_CONDITIONAL_ENABLE: |
122 | if (!(register_bit & gpe_register_info->enable_for_run)) | 122 | if (!(register_bit & gpe_register_info->enable_for_run)) |
123 | return (AE_BAD_PARAMETER); | 123 | return (AE_BAD_PARAMETER); |
124 | 124 | ||
diff --git a/drivers/acpi/acpica/utglobal.c b/drivers/acpi/acpica/utglobal.c index e87bc6760be6..a99c32aa48a4 100644 --- a/drivers/acpi/acpica/utglobal.c +++ b/drivers/acpi/acpica/utglobal.c | |||
@@ -768,7 +768,7 @@ acpi_status acpi_ut_init_globals(void) | |||
768 | acpi_gbl_gpe_fadt_blocks[0] = NULL; | 768 | acpi_gbl_gpe_fadt_blocks[0] = NULL; |
769 | acpi_gbl_gpe_fadt_blocks[1] = NULL; | 769 | acpi_gbl_gpe_fadt_blocks[1] = NULL; |
770 | acpi_current_gpe_count = 0; | 770 | acpi_current_gpe_count = 0; |
771 | acpi_all_gpes_initialized = FALSE; | 771 | acpi_gbl_all_gpes_initialized = FALSE; |
772 | 772 | ||
773 | /* Global handlers */ | 773 | /* Global handlers */ |
774 | 774 | ||