struct acpi_ec		*ec, 
union acpi_ec		*ec, 
acpi_ec_write (	struct acpi_ec		*ec,	u8			address,	u8			data){	int			status = 0;	u32			glk;	u32			tmp;	ACPI_FUNCTION_TRACE("acpi_ec_write");	if (!ec)		return_VALUE(-EINVAL);retry:	if (ec->global_lock) {		status = acpi_acquire_global_lock(ACPI_EC_UDELAY_GLK, &glk);		if (ACPI_FAILURE(status))			return_VALUE(-ENODEV);	}	WARN_ON(in_interrupt());	down(&ec->sem);	if(acpi_ec_enter_burst_mode(ec))		goto end;	status = acpi_ec_read_status(ec);	if (status != -EINVAL &&		!(status & ACPI_EC_FLAG_BURST)){		acpi_hw_low_level_write(8, ACPI_EC_BURST_ENABLE, &ec->command_addr);		status = acpi_ec_wait(ec, ACPI_EC_EVENT_OBF);		if (status)			goto end;		acpi_hw_low_level_read(8, &tmp, &ec->data_addr);		if(tmp != 0x90 ) /* Burst ACK byte*/			goto end;	}	/*Now we are in burst mode*/	acpi_hw_low_level_write(8, ACPI_EC_COMMAND_WRITE, &ec->command_addr);	status = acpi_ec_wait(ec, ACPI_EC_EVENT_IBE);	acpi_enable_gpe(NULL, ec->gpe_bit, ACPI_NOT_ISR);	if (status){		goto end;	}	acpi_hw_low_level_write(8, address, &ec->data_addr);	status = acpi_ec_wait(ec, ACPI_EC_EVENT_IBE);	if (status){		acpi_enable_gpe(NULL, ec->gpe_bit, ACPI_NOT_ISR);		goto end;	}	acpi_hw_low_level_write(8, data, &ec->data_addr);	status = acpi_ec_wait(ec, ACPI_EC_EVENT_IBE);	acpi_enable_gpe(NULL, ec->gpe_bit, ACPI_NOT_ISR);	if (status)		goto end;	ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Wrote [%02x] to address [%02x]\n",		data, address));end:	acpi_ec_leave_burst_mode(ec);	up(&ec->sem);	if (ec->global_lock)		acpi_release_global_lock(glk);	if(atomic_read(&ec->leaving_burst) == 2){		ACPI_DEBUG_PRINT((ACPI_DB_INFO,"aborted, retry ...\n"));		while(atomic_read(&ec->pending_gpe)){			msleep(1);			}		acpi_enable_gpe(NULL, ec->gpe_bit, ACPI_NOT_ISR);		goto retry;	}	return_VALUE(status);}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/45bea1555f5bf0cd5871b208b4b02d188f106861/ec.c/buggy/drivers/acpi/ec.c