int	result = 0;  ACPI_FUNCTION_TRACE("acpi_ec_wait");  ec->expect_event = event; smp_mb();  result = wait_event_interruptible_timeout(ec->wait, !ec->expect_event, msecs_to_jiffies(ACPI_EC_DELAY));  ec->expect_event = 0; smp_mb();  if (result < 0){ ACPI_DEBUG_PRINT((ACPI_DB_ERROR," result  = %d ", result)); return_VALUE(result); }  /* * Verify that the event in question has actually happened by * querying EC status. Do the check even if operation timed-out * to make sure that we did not miss interrupt. */ switch (event) { case ACPI_EC_EVENT_OBF: if (acpi_ec_read_status(ec) & ACPI_EC_FLAG_OBF) return_VALUE(0); break;  case ACPI_EC_EVENT_IBE: if (~acpi_ec_read_status(ec) & ACPI_EC_FLAG_IBF) return_VALUE(0); break; }  return_VALUE(-ETIME); 
if (acpi_ec_polling_mode) return acpi_ec_polling_wait (ec, event); else return acpi_ec_burst_wait (ec, event); 
static int acpi_ec_wait(struct acpi_ec *ec, unsigned int event){	int	result = 0;	ACPI_FUNCTION_TRACE("acpi_ec_wait");	ec->expect_event = event;	smp_mb();	result = wait_event_interruptible_timeout(ec->wait,					!ec->expect_event,					msecs_to_jiffies(ACPI_EC_DELAY));		ec->expect_event = 0;	smp_mb();	if (result < 0){		ACPI_DEBUG_PRINT((ACPI_DB_ERROR," result  = %d ", result));		return_VALUE(result);	}	/*	 * Verify that the event in question has actually happened by	 * querying EC status. Do the check even if operation timed-out	 * to make sure that we did not miss interrupt.	 */	switch (event) {	case ACPI_EC_EVENT_OBF:		if (acpi_ec_read_status(ec) & ACPI_EC_FLAG_OBF)			return_VALUE(0);		break;	case ACPI_EC_EVENT_IBE:		if (~acpi_ec_read_status(ec) & ACPI_EC_FLAG_IBF)			return_VALUE(0);		break;	}	return_VALUE(-ETIME);}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/45bea1555f5bf0cd5871b208b4b02d188f106861/ec.c/buggy/drivers/acpi/ec.c