mirror of
https://github.com/acpica/acpica/
synced 2025-03-12 17:22:52 +03:00
Converted to new return macros
date 99.08.13.16.58.00; author rmoore1; state Exp;
This commit is contained in:
parent
6f8cd2954a
commit
3d715aa626
@ -28,7 +28,7 @@
|
||||
* Code in any form, with the right to sublicense such rights; and
|
||||
*
|
||||
* 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
|
||||
* license (without the right to sublicense), under only those claims of Intel
|
||||
* license (with the right to sublicense), under only those claims of Intel
|
||||
* patents that are infringed by the Original Intel Code, to make, use, sell,
|
||||
* offer to sell, and import the Covered Code and derivative works thereof
|
||||
* solely to the minimum extent necessary to exercise the above copyright
|
||||
@ -220,8 +220,7 @@ EvInstallSciHandler (void)
|
||||
EvSciHandler,
|
||||
NULL);
|
||||
|
||||
FUNCTION_EXIT;
|
||||
return Except;
|
||||
return_ACPI_STATUS (Except);
|
||||
}
|
||||
|
||||
|
||||
@ -281,8 +280,7 @@ EvRemoveSciHandler (void)
|
||||
(UINT32) FACP->SciInt,
|
||||
EvSciHandler);
|
||||
|
||||
FUNCTION_EXIT;
|
||||
return AE_OK;
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
}
|
||||
|
||||
|
||||
@ -328,8 +326,7 @@ EvSciCount (
|
||||
Count = EventCount[Event];
|
||||
}
|
||||
|
||||
FUNCTION_EXIT;
|
||||
return Count;
|
||||
return_VALUE (Count);
|
||||
}
|
||||
|
||||
#endif
|
||||
@ -408,8 +405,7 @@ EvRestoreAcpiState (void)
|
||||
}
|
||||
}
|
||||
|
||||
FUNCTION_EXIT;
|
||||
return;
|
||||
return_VOID;
|
||||
}
|
||||
|
||||
|
||||
@ -445,7 +441,7 @@ EvTerminate (void)
|
||||
CmFree (GpeInfo);
|
||||
}
|
||||
|
||||
FUNCTION_EXIT;
|
||||
return_VOID;
|
||||
}
|
||||
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
||||
* Code in any form, with the right to sublicense such rights; and
|
||||
*
|
||||
* 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
|
||||
* license (without the right to sublicense), under only those claims of Intel
|
||||
* license (with the right to sublicense), under only those claims of Intel
|
||||
* patents that are infringed by the Original Intel Code, to make, use, sell,
|
||||
* offer to sell, and import the Covered Code and derivative works thereof
|
||||
* solely to the minimum extent necessary to exercise the above copyright
|
||||
@ -154,8 +154,7 @@ AcpiEnable (void)
|
||||
/* ACPI tables are not available */
|
||||
|
||||
DEBUG_PRINT (ACPI_WARN, ("No ACPI tables present!\n"));
|
||||
FUNCTION_STATUS_EXIT (AE_NO_ACPI_TABLES);
|
||||
return AE_NO_ACPI_TABLES;
|
||||
return_ACPI_STATUS (AE_NO_ACPI_TABLES);
|
||||
}
|
||||
|
||||
/* ACPI tables are available or not required */
|
||||
@ -169,8 +168,7 @@ AcpiEnable (void)
|
||||
/* TBD: verify input file specified */
|
||||
|
||||
DEBUG_PRINT (ACPI_WARN, ("Only legacy mode supported!\n"));
|
||||
FUNCTION_STATUS_EXIT (AE_ERROR);
|
||||
return AE_ERROR;
|
||||
return_ACPI_STATUS (AE_ERROR);
|
||||
}
|
||||
|
||||
OriginalMode = HwGetMode();
|
||||
@ -180,8 +178,7 @@ AcpiEnable (void)
|
||||
/* Unable to install SCI handler */
|
||||
|
||||
DEBUG_PRINT (ACPI_FATAL, ("Unable to install System Control Interrupt Handler"));
|
||||
FUNCTION_STATUS_EXIT (AE_ERROR);
|
||||
return AE_ERROR;
|
||||
return_ACPI_STATUS (AE_ERROR);
|
||||
}
|
||||
|
||||
/* SCI Interrupt Handler installed properly */
|
||||
@ -195,8 +192,7 @@ AcpiEnable (void)
|
||||
/* Unable to transition to ACPI Mode */
|
||||
|
||||
DEBUG_PRINT (ACPI_FATAL, ("Could not transition to ACPI mode.\n"));
|
||||
FUNCTION_STATUS_EXIT (AE_ERROR);
|
||||
return AE_ERROR;
|
||||
return_ACPI_STATUS (AE_ERROR);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -210,17 +206,14 @@ AcpiEnable (void)
|
||||
/* Unable to initialize GPEs. */
|
||||
|
||||
DEBUG_PRINT (ACPI_FATAL, ("Unable to initialize general purpose events.\n"));
|
||||
FUNCTION_STATUS_EXIT (AE_ERROR);
|
||||
return AE_ERROR;
|
||||
return_ACPI_STATUS (AE_ERROR);
|
||||
}
|
||||
|
||||
EvInitGpeControlMethods ();
|
||||
|
||||
}
|
||||
|
||||
FUNCTION_STATUS_EXIT (AE_OK);
|
||||
return AE_OK;
|
||||
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
}
|
||||
|
||||
|
||||
@ -265,8 +258,7 @@ AcpiDisable (void)
|
||||
|
||||
}
|
||||
|
||||
FUNCTION_STATUS_EXIT (Status);
|
||||
return Status;
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
|
||||
@ -299,16 +291,14 @@ AcpiInstallFixedEventHandler (
|
||||
|
||||
if (Event >= NUM_FIXED_EVENTS)
|
||||
{
|
||||
FUNCTION_STATUS_EXIT (AE_BAD_PARAMETER);
|
||||
return AE_BAD_PARAMETER;
|
||||
return_ACPI_STATUS (AE_BAD_PARAMETER);
|
||||
}
|
||||
|
||||
/* Don't allow two handlers. */
|
||||
|
||||
if (NULL != FixedEventHandlers[Event])
|
||||
{
|
||||
FUNCTION_STATUS_EXIT (AE_EXIST);
|
||||
return AE_EXIST;
|
||||
return_ACPI_STATUS (AE_EXIST);
|
||||
}
|
||||
|
||||
/* Install the handler before enabling the event - just in case... */
|
||||
@ -319,14 +309,12 @@ AcpiInstallFixedEventHandler (
|
||||
{
|
||||
DEBUG_PRINT (ACPI_WARN, ("Could not write to fixed event enable register.\n"));
|
||||
FixedEventHandlers[Event] = NULL;
|
||||
FUNCTION_STATUS_EXIT (AE_ERROR);
|
||||
return AE_ERROR;
|
||||
return_ACPI_STATUS (AE_ERROR);
|
||||
}
|
||||
|
||||
DEBUG_PRINT (ACPI_INFO, ("Enabled fixed event %d. Handler: %x\n", Event, Handler));
|
||||
|
||||
FUNCTION_STATUS_EXIT (AE_OK);
|
||||
return AE_OK;
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
}
|
||||
|
||||
|
||||
@ -355,8 +343,7 @@ AcpiRemoveFixedEventHandler (
|
||||
|
||||
if (Event >= NUM_FIXED_EVENTS)
|
||||
{
|
||||
FUNCTION_STATUS_EXIT (AE_BAD_PARAMETER);
|
||||
return AE_BAD_PARAMETER;
|
||||
return_ACPI_STATUS (AE_BAD_PARAMETER);
|
||||
}
|
||||
|
||||
/* Disable the event before removing the handler - just in case... */
|
||||
@ -364,15 +351,13 @@ AcpiRemoveFixedEventHandler (
|
||||
if (0 != HwRegisterIO (ACPI_WRITE, Event + TMR_EN, 0))
|
||||
{
|
||||
DEBUG_PRINT (ACPI_WARN, ("Could not write to fixed event enable register.\n"));
|
||||
FUNCTION_STATUS_EXIT (AE_ERROR);
|
||||
return AE_ERROR;
|
||||
return_ACPI_STATUS (AE_ERROR);
|
||||
}
|
||||
|
||||
FixedEventHandlers[Event] = NULL;
|
||||
DEBUG_PRINT (ACPI_INFO, ("Disabled fixed event %d.\n", Event));
|
||||
|
||||
FUNCTION_STATUS_EXIT (AE_OK);
|
||||
return AE_OK;
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
}
|
||||
|
||||
|
||||
@ -404,8 +389,7 @@ AcpiInstallGpeHandler (
|
||||
|
||||
if (!Handler || (GpeNumber >= GpeRegisterCount))
|
||||
{
|
||||
FUNCTION_STATUS_EXIT (AE_BAD_PARAMETER);
|
||||
return AE_BAD_PARAMETER;
|
||||
return_ACPI_STATUS (AE_BAD_PARAMETER);
|
||||
}
|
||||
|
||||
|
||||
@ -415,8 +399,7 @@ AcpiInstallGpeHandler (
|
||||
|
||||
if (GpeInfo[GpeNumber].Handler)
|
||||
{
|
||||
FUNCTION_STATUS_EXIT (AE_EXIST);
|
||||
return AE_EXIST;
|
||||
return_ACPI_STATUS (AE_EXIST);
|
||||
}
|
||||
|
||||
|
||||
@ -430,8 +413,7 @@ AcpiInstallGpeHandler (
|
||||
|
||||
HwEnableGpe (GpeNumber);
|
||||
|
||||
FUNCTION_STATUS_EXIT (AE_OK);
|
||||
return AE_OK;
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
}
|
||||
|
||||
|
||||
@ -460,8 +442,7 @@ AcpiRemoveGpeHandler (
|
||||
|
||||
if (!Handler || (GpeNumber >= GpeRegisterCount))
|
||||
{
|
||||
FUNCTION_STATUS_EXIT (AE_BAD_PARAMETER);
|
||||
return AE_BAD_PARAMETER;
|
||||
return_ACPI_STATUS (AE_BAD_PARAMETER);
|
||||
}
|
||||
|
||||
|
||||
@ -471,8 +452,7 @@ AcpiRemoveGpeHandler (
|
||||
|
||||
if (GpeInfo[GpeNumber].Handler != Handler)
|
||||
{
|
||||
FUNCTION_STATUS_EXIT (AE_BAD_PARAMETER);
|
||||
return AE_BAD_PARAMETER;
|
||||
return_ACPI_STATUS (AE_BAD_PARAMETER);
|
||||
}
|
||||
|
||||
|
||||
@ -487,8 +467,7 @@ AcpiRemoveGpeHandler (
|
||||
GpeInfo[GpeNumber].Context = NULL;
|
||||
|
||||
|
||||
FUNCTION_STATUS_EXIT (AE_OK);
|
||||
return AE_OK;
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
}
|
||||
|
||||
|
||||
@ -523,8 +502,7 @@ AcpiInstallNotifyHandler (
|
||||
|
||||
if (!Handler)
|
||||
{
|
||||
FUNCTION_STATUS_EXIT (AE_BAD_PARAMETER);
|
||||
return AE_BAD_PARAMETER;
|
||||
return_ACPI_STATUS (AE_BAD_PARAMETER);
|
||||
}
|
||||
|
||||
|
||||
@ -532,8 +510,7 @@ AcpiInstallNotifyHandler (
|
||||
|
||||
if (!(ObjEntry = NsConvertHandleToEntry (Device)))
|
||||
{
|
||||
FUNCTION_STATUS_EXIT (AE_BAD_PARAMETER);
|
||||
return AE_BAD_PARAMETER;
|
||||
return_ACPI_STATUS (AE_BAD_PARAMETER);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -544,8 +521,7 @@ AcpiInstallNotifyHandler (
|
||||
if ((ObjEntry->Type != TYPE_Device) &&
|
||||
(ObjEntry->Type != TYPE_Thermal))
|
||||
{
|
||||
FUNCTION_STATUS_EXIT (AE_BAD_PARAMETER);
|
||||
return AE_BAD_PARAMETER;
|
||||
return_ACPI_STATUS (AE_BAD_PARAMETER);
|
||||
}
|
||||
|
||||
|
||||
@ -560,8 +536,7 @@ AcpiInstallNotifyHandler (
|
||||
{
|
||||
/* Descriptor allocation failure */
|
||||
|
||||
FUNCTION_STATUS_EXIT (AE_NO_MEMORY);
|
||||
return AE_NO_MEMORY;
|
||||
return_ACPI_STATUS (AE_NO_MEMORY);
|
||||
}
|
||||
|
||||
/* Init */
|
||||
@ -577,8 +552,7 @@ AcpiInstallNotifyHandler (
|
||||
ObjDesc = ObjEntry->Value;
|
||||
if (ObjDesc->Device.Handler)
|
||||
{
|
||||
FUNCTION_STATUS_EXIT (AE_EXIST);
|
||||
return AE_EXIST;
|
||||
return_ACPI_STATUS (AE_EXIST);
|
||||
}
|
||||
}
|
||||
|
||||
@ -593,8 +567,7 @@ AcpiInstallNotifyHandler (
|
||||
ObjDesc->Device.Context = Context;
|
||||
|
||||
|
||||
FUNCTION_STATUS_EXIT (AE_OK);
|
||||
return AE_OK;
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
}
|
||||
|
||||
|
||||
@ -627,8 +600,7 @@ AcpiRemoveNotifyHandler (
|
||||
|
||||
if (!Handler)
|
||||
{
|
||||
FUNCTION_STATUS_EXIT (AE_BAD_PARAMETER);
|
||||
return AE_BAD_PARAMETER;
|
||||
return_ACPI_STATUS (AE_BAD_PARAMETER);
|
||||
}
|
||||
|
||||
|
||||
@ -636,8 +608,7 @@ AcpiRemoveNotifyHandler (
|
||||
|
||||
if (!(ObjEntry = NsConvertHandleToEntry (Device)))
|
||||
{
|
||||
FUNCTION_STATUS_EXIT (AE_BAD_PARAMETER);
|
||||
return AE_BAD_PARAMETER;
|
||||
return_ACPI_STATUS (AE_BAD_PARAMETER);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -648,8 +619,7 @@ AcpiRemoveNotifyHandler (
|
||||
if ((ObjEntry->Type != TYPE_Device) &&
|
||||
(ObjEntry->Type != TYPE_Thermal))
|
||||
{
|
||||
FUNCTION_STATUS_EXIT (AE_BAD_PARAMETER);
|
||||
return AE_BAD_PARAMETER;
|
||||
return_ACPI_STATUS (AE_BAD_PARAMETER);
|
||||
}
|
||||
|
||||
|
||||
@ -657,8 +627,7 @@ AcpiRemoveNotifyHandler (
|
||||
|
||||
if (!ObjEntry->Value)
|
||||
{
|
||||
FUNCTION_STATUS_EXIT (AE_NOT_EXIST);
|
||||
return AE_NOT_EXIST;
|
||||
return_ACPI_STATUS (AE_NOT_EXIST);
|
||||
|
||||
}
|
||||
|
||||
@ -667,8 +636,7 @@ AcpiRemoveNotifyHandler (
|
||||
ObjDesc = ObjEntry->Value;
|
||||
if (ObjDesc->Device.Handler != Handler)
|
||||
{
|
||||
FUNCTION_STATUS_EXIT (AE_BAD_PARAMETER);
|
||||
return AE_BAD_PARAMETER;
|
||||
return_ACPI_STATUS (AE_BAD_PARAMETER);
|
||||
}
|
||||
|
||||
|
||||
@ -683,8 +651,7 @@ AcpiRemoveNotifyHandler (
|
||||
ObjDesc->Device.Context = NULL;
|
||||
|
||||
|
||||
FUNCTION_STATUS_EXIT (AE_OK);
|
||||
return AE_OK;
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
}
|
||||
|
||||
|
||||
@ -716,8 +683,7 @@ AcpiInstallAddressSpaceHandler (
|
||||
if ((!Handler) ||
|
||||
(SpaceId > ACPI_MAX_ADDRESS_SPACE))
|
||||
{
|
||||
FUNCTION_STATUS_EXIT (AE_BAD_PARAMETER);
|
||||
return AE_BAD_PARAMETER;
|
||||
return_ACPI_STATUS (AE_BAD_PARAMETER);
|
||||
}
|
||||
|
||||
|
||||
@ -728,8 +694,7 @@ AcpiInstallAddressSpaceHandler (
|
||||
|
||||
if (AddressSpaces[SpaceId].Handler)
|
||||
{
|
||||
FUNCTION_STATUS_EXIT (AE_EXIST);
|
||||
return AE_EXIST;
|
||||
return_ACPI_STATUS (AE_EXIST);
|
||||
}
|
||||
|
||||
/* Install the handler */
|
||||
@ -738,8 +703,7 @@ AcpiInstallAddressSpaceHandler (
|
||||
AddressSpaces[SpaceId].Context = Context;
|
||||
|
||||
|
||||
FUNCTION_STATUS_EXIT (AE_OK);
|
||||
return AE_OK;
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
}
|
||||
|
||||
|
||||
@ -769,8 +733,7 @@ AcpiRemoveAddressSpaceHandler (
|
||||
if ((!Handler) ||
|
||||
(SpaceId > ACPI_MAX_ADDRESS_SPACE))
|
||||
{
|
||||
FUNCTION_STATUS_EXIT (AE_BAD_PARAMETER);
|
||||
return AE_BAD_PARAMETER;
|
||||
return_ACPI_STATUS (AE_BAD_PARAMETER);
|
||||
}
|
||||
|
||||
/* TBD: Mutex */
|
||||
@ -779,8 +742,7 @@ AcpiRemoveAddressSpaceHandler (
|
||||
|
||||
if (AddressSpaces[SpaceId].Handler != Handler)
|
||||
{
|
||||
FUNCTION_STATUS_EXIT (AE_BAD_PARAMETER);
|
||||
return AE_BAD_PARAMETER;
|
||||
return_ACPI_STATUS (AE_BAD_PARAMETER);
|
||||
}
|
||||
|
||||
/* Remove the handler */
|
||||
@ -789,6 +751,5 @@ AcpiRemoveAddressSpaceHandler (
|
||||
AddressSpaces[SpaceId].Context = NULL;
|
||||
|
||||
|
||||
FUNCTION_STATUS_EXIT (AE_OK);
|
||||
return AE_OK;
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user