acpi_os_acquire_lock (acpi_gbl_gpe_lock, ACPI_NOT_ISR); 
flags = acpi_os_acquire_lock (acpi_gbl_gpe_lock); 
acpi_install_gpe_handler (	acpi_handle                     gpe_device,	u32                             gpe_number,	u32                             type,	acpi_event_handler              address,	void                            *context){	struct acpi_gpe_event_info      *gpe_event_info;	struct acpi_handler_info        *handler;	acpi_status                     status;	ACPI_FUNCTION_TRACE ("acpi_install_gpe_handler");	/* Parameter validation */	if ((!address) || (type > ACPI_GPE_XRUPT_TYPE_MASK)) {		return_ACPI_STATUS (AE_BAD_PARAMETER);	}	status = acpi_ut_acquire_mutex (ACPI_MTX_EVENTS);	if (ACPI_FAILURE (status)) {		return_ACPI_STATUS (status);	}	/* Ensure that we have a valid GPE number */	gpe_event_info = acpi_ev_get_gpe_event_info (gpe_device, gpe_number);	if (!gpe_event_info) {		status = AE_BAD_PARAMETER;		goto unlock_and_exit;	}	/* Make sure that there isn't a handler there already */	if ((gpe_event_info->flags & ACPI_GPE_DISPATCH_MASK) == ACPI_GPE_DISPATCH_HANDLER) {		status = AE_ALREADY_EXISTS;		goto unlock_and_exit;	}	/* Allocate and init handler object */	handler = ACPI_MEM_CALLOCATE (sizeof (struct acpi_handler_info));	if (!handler) {		status = AE_NO_MEMORY;		goto unlock_and_exit;	}	handler->address    = address;	handler->context    = context;	handler->method_node = gpe_event_info->dispatch.method_node;	/* Disable the GPE before installing the handler */	status = acpi_ev_disable_gpe (gpe_event_info);	if (ACPI_FAILURE (status)) {		goto unlock_and_exit;	}	/* Install the handler */	acpi_os_acquire_lock (acpi_gbl_gpe_lock, ACPI_NOT_ISR);	gpe_event_info->dispatch.handler = handler;	/* Setup up dispatch flags to indicate handler (vs. method) */	gpe_event_info->flags &= ~(ACPI_GPE_XRUPT_TYPE_MASK | ACPI_GPE_DISPATCH_MASK); /* Clear bits */	gpe_event_info->flags |= (u8) (type | ACPI_GPE_DISPATCH_HANDLER);	acpi_os_release_lock (acpi_gbl_gpe_lock, ACPI_NOT_ISR);unlock_and_exit:	(void) acpi_ut_release_mutex (ACPI_MTX_EVENTS);	return_ACPI_STATUS (status);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/73459f73e5d1602c59ebec114fc45185521353c1/evxface.c/clean/drivers/acpi/events/evxface.c