spin_lock_init(&ec_ecdt->lock); 
acpi_ec_get_real_ecdt(void){	acpi_status		status;	struct acpi_table_ecdt 	*ecdt_ptr;	status = acpi_get_firmware_table("ECDT", 1, ACPI_LOGICAL_ADDRESSING, 		(struct acpi_table_header **) &ecdt_ptr);	if (ACPI_FAILURE(status))		return -ENODEV;	printk(KERN_INFO PREFIX "Found ECDT\n");	/*	 * Generate a temporary ec context to use until the namespace is scanned	 */	ec_ecdt = kmalloc(sizeof(struct acpi_ec), GFP_KERNEL);	if (!ec_ecdt)		return -ENOMEM;	memset(ec_ecdt, 0, sizeof(struct acpi_ec));	ec_ecdt->command_addr = ecdt_ptr->ec_control;	ec_ecdt->status_addr = ecdt_ptr->ec_control;	ec_ecdt->data_addr = ecdt_ptr->ec_data;	ec_ecdt->gpe_bit = ecdt_ptr->gpe_bit;	spin_lock_init(&ec_ecdt->lock);	/* use the GL just to be safe */	ec_ecdt->global_lock = TRUE;	ec_ecdt->uid = ecdt_ptr->uid;	status = acpi_get_handle(NULL, ecdt_ptr->ec_id, &ec_ecdt->handle);	if (ACPI_FAILURE(status)) {		goto error;	}	return 0;error:	printk(KERN_ERR PREFIX "Could not use ECDT\n");	kfree(ec_ecdt);	ec_ecdt = NULL;	return -ENODEV;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/451566f45a2e6cd10ba56e7220a9dd84ba3ef550/ec.c/buggy/drivers/acpi/ec.c