ACK: [PATCH] acpica: fwts_acpica: remove fwtsInstallLateHandlers
Alex Hung
alex.hung at canonical.com
Mon Feb 18 03:35:07 UTC 2013
On 02/13/2013 05:35 PM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> Move fixed event handler init to fwtsInstallEarlyHandlers and
> remove the duplicated AcpiInstallAddressSpaceHandler installs.
> This ends up with an empty fwtsInstallLateHandlers which means
> we can remove this function altogther.
>
> This slight change removes the unsightly ACPI initialisation
> warnings.
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
> src/acpica/fwts_acpica.c | 43 +++++++++++++------------------------------
> 1 file changed, 13 insertions(+), 30 deletions(-)
>
> diff --git a/src/acpica/fwts_acpica.c b/src/acpica/fwts_acpica.c
> index 65caa18..b9c8839 100644
> --- a/src/acpica/fwts_acpica.c
> +++ b/src/acpica/fwts_acpica.c
> @@ -779,35 +779,6 @@ void AcpiOsSleep(UINT64 milliseconds)
> {
> }
>
> -int fwtsInstallLateHandlers(fwts_framework *fw)
> -{
> - int i;
> -
> - if (!AcpiGbl_ReducedHardware) {
> - if (AcpiInstallFixedEventHandler(ACPI_EVENT_GLOBAL, fwts_event_handler, NULL) != AE_OK) {
> - fwts_log_error(fw, "Failed to install global event handler.");
> - return FWTS_ERROR;
> - }
> - if (AcpiInstallFixedEventHandler(ACPI_EVENT_RTC, fwts_event_handler, NULL) != AE_OK) {
> - fwts_log_error(fw, "Failed to install RTC event handler.");
> - return FWTS_ERROR;
> - }
> - }
> -
> - for (i = 0; i < ACPI_ARRAY_LENGTH(fwts_space_id_list); i++) {
> - if (AcpiInstallAddressSpaceHandler(AcpiGbl_RootNode,
> - fwts_space_id_list[i], fwts_region_handler, fwts_region_init, NULL) != AE_OK) {
> - fwts_log_error(fw,
> - "Failed to install handler for %s space(%u)",
> - AcpiUtGetRegionName((UINT8)fwts_space_id_list[i]),
> - fwts_space_id_list[i]);
> - return FWTS_ERROR;
> - }
> - }
> -
> - return FWTS_OK;
> -}
> -
> int fwtsInstallEarlyHandlers(fwts_framework *fw)
> {
> int i;
> @@ -889,6 +860,18 @@ int fwtsInstallEarlyHandlers(fwts_framework *fw)
> return FWTS_ERROR;
> }
> }
> +
> + if (!AcpiGbl_ReducedHardware) {
> + if (AcpiInstallFixedEventHandler(ACPI_EVENT_GLOBAL, fwts_event_handler, NULL) != AE_OK) {
> + fwts_log_error(fw, "Failed to install global event handler.");
> + return FWTS_ERROR;
> + }
> + if (AcpiInstallFixedEventHandler(ACPI_EVENT_RTC, fwts_event_handler, NULL) != AE_OK) {
> + fwts_log_error(fw, "Failed to install RTC event handler.");
> + return FWTS_ERROR;
> + }
> + }
> +
> return FWTS_OK;
> }
>
> @@ -918,6 +901,7 @@ int fwts_acpica_init(fwts_framework *fw)
>
> AcpiOsRedirectOutput(stderr);
>
> +
> if (ACPI_FAILURE(AcpiInitializeSubsystem())) {
> fwts_log_error(fw, "Failed to initialise ACPICA subsystem.");
> return FWTS_ERROR;
> @@ -1074,7 +1058,6 @@ int fwts_acpica_init(fwts_framework *fw)
> (void)fwtsInstallEarlyHandlers(fw);
> AcpiEnableSubsystem(init_flags);
> AcpiInitializeObjects(init_flags);
> - (void)fwtsInstallLateHandlers(fw);
>
> fwts_acpica_init_called = true;
>
>
Acked-by: Alex Hung <alex.hung at canonical.com>
More information about the fwts-devel
mailing list