Clarify METHOD_NAME* defines for full-pathname cases.

Changed the METHOD_NAME* defines that define a full pathname to the
method to METHOD_PATHNAME* in order to make it clear that it is not a simple
4-character ACPI name. Used for the various sleep/wake methods.
This commit is contained in:
Robert Moore 2012-02-16 08:39:00 -08:00
parent cefd94b547
commit fbf40bbd3c
5 changed files with 23 additions and 23 deletions

View File

@ -125,7 +125,7 @@
*
* FUNCTION: AcpiHwExecuteSleepMethod
*
* PARAMETERS: MethodName - Pathname of method to execute
* PARAMETERS: MethodPathname - Pathname of method to execute
* IntegerArgument - Argument to pass to the method
*
* RETURN: None
@ -137,7 +137,7 @@
void
AcpiHwExecuteSleepMethod (
char *MethodName,
char *MethodPathname,
UINT32 IntegerArgument)
{
ACPI_OBJECT_LIST ArgList;
@ -155,11 +155,11 @@ AcpiHwExecuteSleepMethod (
Arg.Type = ACPI_TYPE_INTEGER;
Arg.Integer.Value = (UINT64) IntegerArgument;
Status = AcpiEvaluateObject (NULL, MethodName, &ArgList, NULL);
Status = AcpiEvaluateObject (NULL, MethodPathname, &ArgList, NULL);
if (ACPI_FAILURE (Status) && Status != AE_NOT_FOUND)
{
ACPI_EXCEPTION ((AE_INFO, Status, "While executing method %s",
MethodName));
MethodPathname));
}
return_VOID;
@ -212,7 +212,7 @@ AcpiHwExtendedSleep (
/* Execute the _GTS method (Going To Sleep) */
AcpiHwExecuteSleepMethod (METHOD_NAME__GTS, SleepState);
AcpiHwExecuteSleepMethod (METHOD_PATHNAME__GTS, SleepState);
/* Flush caches, as per ACPI specification */
@ -288,7 +288,7 @@ AcpiHwExtendedWakePrep (
&AcpiGbl_FADT.SleepControl);
}
AcpiHwExecuteSleepMethod (METHOD_NAME__BFS, SleepState);
AcpiHwExecuteSleepMethod (METHOD_PATHNAME__BFS, SleepState);
return_ACPI_STATUS (AE_OK);
}
@ -319,8 +319,8 @@ AcpiHwExtendedWake (
/* Execute the wake methods */
AcpiHwExecuteSleepMethod (METHOD_NAME__SST, ACPI_SST_WAKING);
AcpiHwExecuteSleepMethod (METHOD_NAME__WAK, SleepState);
AcpiHwExecuteSleepMethod (METHOD_PATHNAME__SST, ACPI_SST_WAKING);
AcpiHwExecuteSleepMethod (METHOD_PATHNAME__WAK, SleepState);
/*
* Some BIOS code assumes that WAK_STS will be cleared on resume
@ -330,6 +330,6 @@ AcpiHwExtendedWake (
(void) AcpiWrite (ACPI_X_WAKE_STATUS, &AcpiGbl_FADT.SleepStatus);
AcpiGbl_SystemAwakeAndRunning = TRUE;
AcpiHwExecuteSleepMethod (METHOD_NAME__SST, ACPI_SST_WORKING);
AcpiHwExecuteSleepMethod (METHOD_PATHNAME__SST, ACPI_SST_WORKING);
return_ACPI_STATUS (AE_OK);
}

View File

@ -202,7 +202,7 @@ AcpiHwLegacySleep (
/* Execute the _GTS method (Going To Sleep) */
AcpiHwExecuteSleepMethod (METHOD_NAME__GTS, SleepState);
AcpiHwExecuteSleepMethod (METHOD_PATHNAME__GTS, SleepState);
/* Get current value of PM1A control */
@ -361,7 +361,7 @@ AcpiHwLegacyWakePrep (
}
}
AcpiHwExecuteSleepMethod (METHOD_NAME__BFS, SleepState);
AcpiHwExecuteSleepMethod (METHOD_PATHNAME__BFS, SleepState);
return_ACPI_STATUS (Status);
}
@ -392,7 +392,7 @@ AcpiHwLegacyWake (
/* Ensure EnterSleepStatePrep -> EnterSleepState ordering */
AcpiGbl_SleepTypeA = ACPI_SLEEP_TYPE_INVALID;
AcpiHwExecuteSleepMethod (METHOD_NAME__SST, ACPI_SST_WAKING);
AcpiHwExecuteSleepMethod (METHOD_PATHNAME__SST, ACPI_SST_WAKING);
/*
* GPEs must be enabled before _WAK is called as GPEs
@ -418,7 +418,7 @@ AcpiHwLegacyWake (
* Now we can execute _WAK, etc. Some machines require that the GPEs
* are enabled before the wake methods are executed.
*/
AcpiHwExecuteSleepMethod (METHOD_NAME__WAK, SleepState);
AcpiHwExecuteSleepMethod (METHOD_PATHNAME__WAK, SleepState);
/*
* Some BIOS code assumes that WAK_STS will be cleared on resume
@ -449,7 +449,7 @@ AcpiHwLegacyWake (
return_ACPI_STATUS (Status);
}
AcpiHwExecuteSleepMethod (METHOD_NAME__SST, ACPI_SST_WORKING);
AcpiHwExecuteSleepMethod (METHOD_PATHNAME__SST, ACPI_SST_WORKING);
return_ACPI_STATUS (Status);
}

View File

@ -406,7 +406,7 @@ AcpiEnterSleepStatePrep (
Arg.Type = ACPI_TYPE_INTEGER;
Arg.Integer.Value = SleepState;
Status = AcpiEvaluateObject (NULL, METHOD_NAME__PTS, &ArgList, NULL);
Status = AcpiEvaluateObject (NULL, METHOD_PATHNAME__PTS, &ArgList, NULL);
if (ACPI_FAILURE (Status) && Status != AE_NOT_FOUND)
{
return_ACPI_STATUS (Status);
@ -439,7 +439,7 @@ AcpiEnterSleepStatePrep (
* Set the system indicators to show the desired sleep state.
* _SST is an optional method (return no error if not found)
*/
AcpiHwExecuteSleepMethod (METHOD_NAME__SST, SstValue);
AcpiHwExecuteSleepMethod (METHOD_PATHNAME__SST, SstValue);
return_ACPI_STATUS (AE_OK);
}

View File

@ -214,7 +214,7 @@ AcpiNsDumpRootDevices (
return;
}
Status = AcpiGetHandle (NULL, ACPI_NS_SYSTEM_BUS, &SysBusHandle);
Status = AcpiGetHandle (NULL, METHOD_NAME__SB_, &SysBusHandle);
if (ACPI_FAILURE (Status))
{
return;

View File

@ -118,6 +118,7 @@
/* Method names - these methods can appear anywhere in the namespace */
#define METHOD_NAME__SB_ "_SB_"
#define METHOD_NAME__HID "_HID"
#define METHOD_NAME__CID "_CID"
#define METHOD_NAME__UID "_UID"
@ -136,11 +137,11 @@
/* Method names - these methods must appear at the namespace root */
#define METHOD_NAME__BFS "\\_BFS"
#define METHOD_NAME__GTS "\\_GTS"
#define METHOD_NAME__PTS "\\_PTS"
#define METHOD_NAME__SST "\\_SI._SST"
#define METHOD_NAME__WAK "\\_WAK"
#define METHOD_PATHNAME__BFS "\\_BFS"
#define METHOD_PATHNAME__GTS "\\_GTS"
#define METHOD_PATHNAME__PTS "\\_PTS"
#define METHOD_PATHNAME__SST "\\_SI._SST"
#define METHOD_PATHNAME__WAK "\\_WAK"
/* Definitions of the predefined namespace names */
@ -151,7 +152,6 @@
#define ACPI_PREFIX_LOWER (UINT32) 0x69706361 /* "acpi" */
#define ACPI_NS_ROOT_PATH "\\"
#define ACPI_NS_SYSTEM_BUS "_SB_"
#endif /* __ACNAMES_H__ */