Removed concept of a "static" acpi internal object. This mechanism

conflicted with the object ref count mechanism.


date	2001.09.05.15.11.00;	author rmoore1;	state Exp;
This commit is contained in:
aystarik 2005-06-29 16:41:18 +00:00
parent 28e182a45a
commit 57ad0a353f

View File

@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: evregion - ACPI AddressSpace (OpRegion) handler dispatch
* $Revision: 1.109 $
* $Revision: 1.110 $
*
*****************************************************************************/
@ -217,8 +217,6 @@ AcpiEvExecuteRegMethod (
UINT32 Function)
{
ACPI_OPERAND_OBJECT *Params[3];
ACPI_OPERAND_OBJECT SpaceIdDesc;
ACPI_OPERAND_OBJECT FunctionDesc;
ACPI_STATUS Status;
@ -239,30 +237,37 @@ AcpiEvExecuteRegMethod (
* 0 for disconnecting the handler
* Passed as a parameter
*/
AcpiUtInitStaticObject (&SpaceIdDesc);
AcpiUtInitStaticObject (&FunctionDesc);
Params[0] = AcpiUtCreateInternalObject (ACPI_TYPE_INTEGER);
if (!Params[0])
{
return_ACPI_STATUS (AE_NO_MEMORY);
}
/*
* Method requires two parameters.
*/
Params [0] = &SpaceIdDesc;
Params [1] = &FunctionDesc;
Params [2] = NULL;
Params[1] = AcpiUtCreateInternalObject (ACPI_TYPE_INTEGER);
if (!Params[1])
{
AcpiUtRemoveReference (Params[0]);
return_ACPI_STATUS (AE_NO_MEMORY);
}
Params[2] = NULL;
/*
* Set up the parameter objects
*/
SpaceIdDesc.Common.Type = ACPI_TYPE_INTEGER;
SpaceIdDesc.Integer.Value = RegionObj->Region.SpaceId;
FunctionDesc.Common.Type = ACPI_TYPE_INTEGER;
FunctionDesc.Integer.Value = Function;
Params[0]->Integer.Value = RegionObj->Region.SpaceId;
Params[1]->Integer.Value = Function;
/*
* Execute the method, no return value
*/
DEBUG_EXEC(AcpiUtDisplayInitPathname (RegionObj->Region.Extra->Extra.Method_REG, " [Method]"));
Status = AcpiNsEvaluateByHandle (RegionObj->Region.Extra->Extra.Method_REG, Params, NULL);
AcpiUtRemoveReference (Params[0]);
AcpiUtRemoveReference (Params[1]);
return_ACPI_STATUS (Status);
}