aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica/nswalk.c
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2013-08-08 03:30:05 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-08-13 07:14:16 -0400
commit4ef17507834d19ba4fc24c4c1c61e8f68df356a6 (patch)
tree979deb29c661ebabecd34d3f3fecabc9ed3c9cba /drivers/acpi/acpica/nswalk.c
parenta50abf4842dd7d603a2ad6dcc7f1467fd2a66f03 (diff)
ACPICA: Update names for walk_namespace callbacks to clarify usage.
Use of "preorder" and "postorder" was incorrect. The callbacks are simply invoked during tree ascent and descent during the depth-first walk. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/acpica/nswalk.c')
-rw-r--r--drivers/acpi/acpica/nswalk.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/acpi/acpica/nswalk.c b/drivers/acpi/acpica/nswalk.c
index e70911a9e441..e81f15ef659a 100644
--- a/drivers/acpi/acpica/nswalk.c
+++ b/drivers/acpi/acpica/nswalk.c
@@ -156,9 +156,9 @@ struct acpi_namespace_node *acpi_ns_get_next_node_typed(acpi_object_type type,
156 * max_depth - Depth to which search is to reach 156 * max_depth - Depth to which search is to reach
157 * flags - Whether to unlock the NS before invoking 157 * flags - Whether to unlock the NS before invoking
158 * the callback routine 158 * the callback routine
159 * pre_order_visit - Called during tree pre-order visit 159 * descending_callback - Called during tree descent
160 * when an object of "Type" is found 160 * when an object of "Type" is found
161 * post_order_visit - Called during tree post-order visit 161 * ascending_callback - Called during tree ascent
162 * when an object of "Type" is found 162 * when an object of "Type" is found
163 * context - Passed to user function(s) above 163 * context - Passed to user function(s) above
164 * return_value - from the user_function if terminated 164 * return_value - from the user_function if terminated
@@ -185,8 +185,8 @@ acpi_ns_walk_namespace(acpi_object_type type,
185 acpi_handle start_node, 185 acpi_handle start_node,
186 u32 max_depth, 186 u32 max_depth,
187 u32 flags, 187 u32 flags,
188 acpi_walk_callback pre_order_visit, 188 acpi_walk_callback descending_callback,
189 acpi_walk_callback post_order_visit, 189 acpi_walk_callback ascending_callback,
190 void *context, void **return_value) 190 void *context, void **return_value)
191{ 191{
192 acpi_status status; 192 acpi_status status;
@@ -255,22 +255,22 @@ acpi_ns_walk_namespace(acpi_object_type type,
255 } 255 }
256 256
257 /* 257 /*
258 * Invoke the user function, either pre-order or post-order 258 * Invoke the user function, either descending, ascending,
259 * or both. 259 * or both.
260 */ 260 */
261 if (!node_previously_visited) { 261 if (!node_previously_visited) {
262 if (pre_order_visit) { 262 if (descending_callback) {
263 status = 263 status =
264 pre_order_visit(child_node, level, 264 descending_callback(child_node,
265 context, 265 level, context,
266 return_value); 266 return_value);
267 } 267 }
268 } else { 268 } else {
269 if (post_order_visit) { 269 if (ascending_callback) {
270 status = 270 status =
271 post_order_visit(child_node, level, 271 ascending_callback(child_node,
272 context, 272 level, context,
273 return_value); 273 return_value);
274 } 274 }
275 } 275 }
276 276