int			result = 0; acpi_status		status = AE_OK; unsigned long		flags = 0; u32			glk = 0; 
int			status = 0; u32			glk; 
acpi_ec_query (	struct acpi_ec		*ec,	u32			*data){	int			result = 0;	acpi_status		status = AE_OK;	unsigned long		flags = 0;	u32			glk = 0;	ACPI_FUNCTION_TRACE("acpi_ec_query");	if (!ec || !data)		return_VALUE(-EINVAL);	*data = 0;	if (ec->global_lock) {		status = acpi_acquire_global_lock(ACPI_EC_UDELAY_GLK, &glk);		if (ACPI_FAILURE(status))			return_VALUE(-ENODEV);	}	/*	 * Query the EC to find out which _Qxx method we need to evaluate.	 * Note that successful completion of the query causes the ACPI_EC_SCI	 * bit to be cleared (and thus clearing the interrupt source).	 */	spin_lock_irqsave(&ec->lock, flags);	acpi_hw_low_level_write(8, ACPI_EC_COMMAND_QUERY, &ec->command_addr);	result = acpi_ec_wait(ec, ACPI_EC_EVENT_OBF);	if (result)		goto end;		acpi_hw_low_level_read(8, data, &ec->data_addr);	if (!*data)		result = -ENODATA;end:	spin_unlock_irqrestore(&ec->lock, flags);	if (ec->global_lock)		acpi_release_global_lock(glk);	return_VALUE(result);}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/451566f45a2e6cd10ba56e7220a9dd84ba3ef550/ec.c/buggy/drivers/acpi/ec.c