Deleted Added
full compact
evxface.c (67754) evxface.c (69450)
1/******************************************************************************
2 *
3 * Module Name: evxface - External interfaces for ACPI events
1/******************************************************************************
2 *
3 * Module Name: evxface - External interfaces for ACPI events
4 * $Revision: 91 $
4 * $Revision: 96 $
5 *
6 *****************************************************************************/
7
8/******************************************************************************
9 *
10 * 1. Copyright Notice
11 *
12 * Some or all of this work - Copyright (c) 1999, Intel Corp. All rights

--- 161 unchanged lines hidden (view full) ---

174 }
175
176
177 /* Install the handler before enabling the event - just in case... */
178
179 AcpiGbl_FixedEventHandlers[Event].Handler = Handler;
180 AcpiGbl_FixedEventHandlers[Event].Context = Context;
181
5 *
6 *****************************************************************************/
7
8/******************************************************************************
9 *
10 * 1. Copyright Notice
11 *
12 * Some or all of this work - Copyright (c) 1999, Intel Corp. All rights

--- 161 unchanged lines hidden (view full) ---

174 }
175
176
177 /* Install the handler before enabling the event - just in case... */
178
179 AcpiGbl_FixedEventHandlers[Event].Handler = Handler;
180 AcpiGbl_FixedEventHandlers[Event].Context = Context;
181
182 if (1 != AcpiHwRegisterAccess (ACPI_WRITE,
183 ACPI_MTX_LOCK, Event + TMR_EN, 1))
182 Status = AcpiEnableEvent(Event, ACPI_EVENT_FIXED);
183
184 if (!ACPI_SUCCESS(Status))
184 {
185 {
185 DEBUG_PRINT (ACPI_WARN,
186 ("Could not write to fixed event enable register.\n"));
186 DEBUG_PRINT (ACPI_WARN, ("Could not enable fixed event.\n"));
187
188 /* Remove the handler */
189
190 AcpiGbl_FixedEventHandlers[Event].Handler = NULL;
191 AcpiGbl_FixedEventHandlers[Event].Context = NULL;
192
193 Status = AE_ERROR;
194 goto Cleanup;

--- 39 unchanged lines hidden (view full) ---

234 {
235 return_ACPI_STATUS (AE_BAD_PARAMETER);
236 }
237
238 AcpiCmAcquireMutex (ACPI_MTX_EVENTS);
239
240 /* Disable the event before removing the handler - just in case... */
241
187
188 /* Remove the handler */
189
190 AcpiGbl_FixedEventHandlers[Event].Handler = NULL;
191 AcpiGbl_FixedEventHandlers[Event].Context = NULL;
192
193 Status = AE_ERROR;
194 goto Cleanup;

--- 39 unchanged lines hidden (view full) ---

234 {
235 return_ACPI_STATUS (AE_BAD_PARAMETER);
236 }
237
238 AcpiCmAcquireMutex (ACPI_MTX_EVENTS);
239
240 /* Disable the event before removing the handler - just in case... */
241
242 if (0 != AcpiHwRegisterAccess (ACPI_WRITE,
243 ACPI_MTX_LOCK, Event + TMR_EN, 0))
242 Status = AcpiDisableEvent(Event, ACPI_EVENT_FIXED);
243
244 if (!ACPI_SUCCESS(Status))
244 {
245 DEBUG_PRINT (ACPI_WARN,
246 ("Could not write to fixed event enable register.\n"));
245 {
246 DEBUG_PRINT (ACPI_WARN,
247 ("Could not write to fixed event enable register.\n"));
248
247 Status = AE_ERROR;
249 Status = AE_ERROR;
248 goto Cleanup;
250 AcpiCmReleaseMutex (ACPI_MTX_EVENTS);
251 return_ACPI_STATUS (Status);
249 }
250
251 /* Remove the handler */
252
253 AcpiGbl_FixedEventHandlers[Event].Handler = NULL;
254 AcpiGbl_FixedEventHandlers[Event].Context = NULL;
255
256 DEBUG_PRINT (ACPI_INFO, ("Disabled fixed event %d.\n", Event));
257
252 }
253
254 /* Remove the handler */
255
256 AcpiGbl_FixedEventHandlers[Event].Handler = NULL;
257 AcpiGbl_FixedEventHandlers[Event].Context = NULL;
258
259 DEBUG_PRINT (ACPI_INFO, ("Disabled fixed event %d.\n", Event));
260
258Cleanup:
259 AcpiCmReleaseMutex (ACPI_MTX_EVENTS);
260 return_ACPI_STATUS (Status);
261}
262
263
264/******************************************************************************
265 *
266 * FUNCTION: AcpiInstallNotifyHandler

--- 478 unchanged lines hidden ---
261 AcpiCmReleaseMutex (ACPI_MTX_EVENTS);
262 return_ACPI_STATUS (Status);
263}
264
265
266/******************************************************************************
267 *
268 * FUNCTION: AcpiInstallNotifyHandler

--- 478 unchanged lines hidden ---