patch-2.4.22 linux-2.4.22/drivers/acpi/parser/psscope.c
Next file: linux-2.4.22/drivers/acpi/parser/pstree.c
Previous file: linux-2.4.22/drivers/acpi/parser/psparse.c
Back to the patch index
Back to the overall index
- Lines: 264
- Date:
2003-08-25 04:44:41.000000000 -0700
- Orig file:
linux-2.4.21/drivers/acpi/parser/psscope.c
- Orig date:
2001-10-24 14:06:22.000000000 -0700
diff -urN linux-2.4.21/drivers/acpi/parser/psscope.c linux-2.4.22/drivers/acpi/parser/psscope.c
@@ -1,41 +1,59 @@
/******************************************************************************
*
* Module Name: psscope - Parser scope stack management routines
- * $Revision: 30 $
*
*****************************************************************************/
/*
- * Copyright (C) 2000, 2001 R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
+ * All rights reserved.
*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions, and the following disclaimer,
+ * without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ * substantially similar to the "NO WARRANTY" disclaimer below
+ * ("Disclaimer") and any redistribution must be conditioned upon
+ * including a substantially similar Disclaimer requirement for further
+ * binary redistribution.
+ * 3. Neither the names of the above-listed copyright holders nor the names
+ * of any contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGES.
*/
-#include "acpi.h"
-#include "acparser.h"
+#include <acpi/acpi.h>
+#include <acpi/acparser.h>
#define _COMPONENT ACPI_PARSER
- MODULE_NAME ("psscope")
+ ACPI_MODULE_NAME ("psscope")
/*******************************************************************************
*
- * FUNCTION: Acpi_ps_get_parent_scope
+ * FUNCTION: acpi_ps_get_parent_scope
*
- * PARAMETERS: Parser_state - Current parser state object
+ * PARAMETERS: parser_state - Current parser state object
*
* RETURN: Pointer to an Op object
*
@@ -43,9 +61,9 @@
*
******************************************************************************/
-acpi_parse_object *
+union acpi_parse_object *
acpi_ps_get_parent_scope (
- acpi_parse_state *parser_state)
+ struct acpi_parse_state *parser_state)
{
return (parser_state->scope->parse_scope.op);
}
@@ -53,9 +71,9 @@
/*******************************************************************************
*
- * FUNCTION: Acpi_ps_has_completed_scope
+ * FUNCTION: acpi_ps_has_completed_scope
*
- * PARAMETERS: Parser_state - Current parser state object
+ * PARAMETERS: parser_state - Current parser state object
*
* RETURN: Boolean, TRUE = scope completed.
*
@@ -67,7 +85,7 @@
u8
acpi_ps_has_completed_scope (
- acpi_parse_state *parser_state)
+ struct acpi_parse_state *parser_state)
{
return ((u8) ((parser_state->aml >= parser_state->scope->parse_scope.arg_end ||
!parser_state->scope->parse_scope.arg_count)));
@@ -76,9 +94,9 @@
/*******************************************************************************
*
- * FUNCTION: Acpi_ps_init_scope
+ * FUNCTION: acpi_ps_init_scope
*
- * PARAMETERS: Parser_state - Current parser state object
+ * PARAMETERS: parser_state - Current parser state object
* Root - the Root Node of this new scope
*
* RETURN: Status
@@ -89,13 +107,13 @@
acpi_status
acpi_ps_init_scope (
- acpi_parse_state *parser_state,
- acpi_parse_object *root_op)
+ struct acpi_parse_state *parser_state,
+ union acpi_parse_object *root_op)
{
- acpi_generic_state *scope;
+ union acpi_generic_state *scope;
- FUNCTION_TRACE_PTR ("Ps_init_scope", root_op);
+ ACPI_FUNCTION_TRACE_PTR ("ps_init_scope", root_op);
scope = acpi_ut_create_generic_state ();
@@ -118,12 +136,12 @@
/*******************************************************************************
*
- * FUNCTION: Acpi_ps_push_scope
+ * FUNCTION: acpi_ps_push_scope
*
- * PARAMETERS: Parser_state - Current parser state object
+ * PARAMETERS: parser_state - Current parser state object
* Op - Current op to be pushed
- * Remaining_args - List of args remaining
- * Arg_count - Fixed or variable number of args
+ * remaining_args - List of args remaining
+ * arg_count - Fixed or variable number of args
*
* RETURN: Status
*
@@ -133,20 +151,20 @@
acpi_status
acpi_ps_push_scope (
- acpi_parse_state *parser_state,
- acpi_parse_object *op,
- u32 remaining_args,
- u32 arg_count)
+ struct acpi_parse_state *parser_state,
+ union acpi_parse_object *op,
+ u32 remaining_args,
+ u32 arg_count)
{
- acpi_generic_state *scope;
+ union acpi_generic_state *scope;
- FUNCTION_TRACE_PTR ("Ps_push_scope", op);
+ ACPI_FUNCTION_TRACE_PTR ("ps_push_scope", op);
scope = acpi_ut_create_generic_state ();
if (!scope) {
- return (AE_NO_MEMORY);
+ return_ACPI_STATUS (AE_NO_MEMORY);
}
@@ -170,7 +188,7 @@
else {
/* single argument */
- scope->parse_scope.arg_end = ACPI_MAX_AML;
+ scope->parse_scope.arg_end = ACPI_TO_POINTER (ACPI_MAX_PTR);
}
return_ACPI_STATUS (AE_OK);
@@ -179,13 +197,13 @@
/*******************************************************************************
*
- * FUNCTION: Acpi_ps_pop_scope
+ * FUNCTION: acpi_ps_pop_scope
*
- * PARAMETERS: Parser_state - Current parser state object
+ * PARAMETERS: parser_state - Current parser state object
* Op - Where the popped op is returned
- * Arg_list - Where the popped "next argument" is
+ * arg_list - Where the popped "next argument" is
* returned
- * Arg_count - Count of objects in Arg_list
+ * arg_count - Count of objects in arg_list
*
* RETURN: Status
*
@@ -195,15 +213,15 @@
void
acpi_ps_pop_scope (
- acpi_parse_state *parser_state,
- acpi_parse_object **op,
- u32 *arg_list,
- u32 *arg_count)
+ struct acpi_parse_state *parser_state,
+ union acpi_parse_object **op,
+ u32 *arg_list,
+ u32 *arg_count)
{
- acpi_generic_state *scope = parser_state->scope;
+ union acpi_generic_state *scope = parser_state->scope;
- FUNCTION_TRACE ("Ps_pop_scope");
+ ACPI_FUNCTION_TRACE ("ps_pop_scope");
/*
@@ -240,9 +258,9 @@
/*******************************************************************************
*
- * FUNCTION: Acpi_ps_cleanup_scope
+ * FUNCTION: acpi_ps_cleanup_scope
*
- * PARAMETERS: Parser_state - Current parser state object
+ * PARAMETERS: parser_state - Current parser state object
*
* RETURN: Status
*
@@ -253,11 +271,11 @@
void
acpi_ps_cleanup_scope (
- acpi_parse_state *parser_state)
+ struct acpi_parse_state *parser_state)
{
- acpi_generic_state *scope;
+ union acpi_generic_state *scope;
- FUNCTION_TRACE_PTR ("Ps_cleanup_scope", parser_state);
+ ACPI_FUNCTION_TRACE_PTR ("ps_cleanup_scope", parser_state);
if (!parser_state) {
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)