dev_err(&adap->dev, "adapter not " "unregistered, because client at " "address %02x can't be detached. ", 
dev_err(&adap->dev, "detach_client failed for client " "[%s] at address 0x%02x\n", client->name, 
int i2c_del_adapter(struct i2c_adapter *adap){	struct list_head  *item, *_n;	struct i2c_adapter *adap_from_list;	struct i2c_driver *driver;	struct i2c_client *client;	int res = 0;	down(&core_lists);	/* First make sure that this adapter was ever added */	list_for_each_entry(adap_from_list, &adapters, list) {		if (adap_from_list == adap)			break;	}	if (adap_from_list != adap) {		pr_debug("I2C: Attempting to delete an unregistered "			 "adapter\n");		res = -EINVAL;		goto out_unlock;	}	list_for_each(item,&drivers) {		driver = list_entry(item, struct i2c_driver, list);		if (driver->detach_adapter)			if ((res = driver->detach_adapter(adap))) {				dev_warn(&adap->dev, "can't detach adapter "					 "while detaching driver %s: driver "					 "not detached!\n", driver->name);				goto out_unlock;			}	}	/* detach any active clients. This must be done first, because	 * it can fail; in which case we give up. */	list_for_each_safe(item, _n, &adap->clients) {		client = list_entry(item, struct i2c_client, list);		/* detaching devices is unconditional of the set notify		 * flag, as _all_ clients that reside on the adapter		 * must be deleted, as this would cause invalid states.		 */		if ((res=client->driver->detach_client(client))) {			dev_err(&adap->dev, "adapter not "				"unregistered, because client at "				"address %02x can't be detached. ",				client->addr);			goto out_unlock;		}	}	/* clean up the sysfs representation */	init_completion(&adap->dev_released);	init_completion(&adap->class_dev_released);	class_device_unregister(&adap->class_dev);	device_remove_file(&adap->dev, &dev_attr_name);	device_unregister(&adap->dev);	list_del(&adap->list);	/* wait for sysfs to drop all references */	wait_for_completion(&adap->dev_released);	wait_for_completion(&adap->class_dev_released);	/* free dynamically allocated bus id */	idr_remove(&i2c_adapter_idr, adap->nr);	dev_dbg(&adap->dev, "adapter unregistered\n"); out_unlock:	up(&core_lists);	return res;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/b6d7b3d1b5a388b7e9af2629a9ecccedee064078/i2c-core.c/clean/drivers/i2c/i2c-core.c