memset(data, 0, sizeof(struct pcf8591_data)); 
int pcf8591_detect(struct i2c_adapter *adapter, int address, int kind){	struct i2c_client *new_client;	struct pcf8591_data *data;	int err = 0;	if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE				     | I2C_FUNC_SMBUS_WRITE_BYTE_DATA))		goto exit;	/* OK. For now, we presume we have a valid client. We now create the	   client structure, even though we cannot fill it completely yet. */	if (!(data = kmalloc(sizeof(struct pcf8591_data), GFP_KERNEL))) {		err = -ENOMEM;		goto exit;	}	memset(data, 0, sizeof(struct pcf8591_data));		new_client = &data->client;	i2c_set_clientdata(new_client, data);	new_client->addr = address;	new_client->adapter = adapter;	new_client->driver = &pcf8591_driver;	new_client->flags = 0;	/* Now, we would do the remaining detection. But the PCF8591 is plainly	   impossible to detect! Stupid chip. */	/* Determine the chip type - only one kind supported! */	if (kind <= 0)		kind = pcf8591;	/* Fill in the remaining client fields and put it into the global 	   list */	strlcpy(new_client->name, "pcf8591", I2C_NAME_SIZE);	init_MUTEX(&data->update_lock);	/* Tell the I2C layer a new client has arrived */	if ((err = i2c_attach_client(new_client)))		goto exit_kfree;	/* Initialize the PCF8591 chip */	pcf8591_init_client(new_client);	/* Register sysfs hooks */	device_create_file(&new_client->dev, &dev_attr_out0_enable);	device_create_file(&new_client->dev, &dev_attr_out0_output);	device_create_file(&new_client->dev, &dev_attr_in0_input);	device_create_file(&new_client->dev, &dev_attr_in1_input);	/* Register input2 if not in "two differential inputs" mode */	if (input_mode != 3 )		device_create_file(&new_client->dev, &dev_attr_in2_input);			/* Register input3 only in "four single ended inputs" mode */	if (input_mode == 0)		device_create_file(&new_client->dev, &dev_attr_in3_input);		return 0;		/* OK, this is not exactly good programming practice, usually. But it is	   very code-efficient in this case. */exit_kfree:	kfree(data);exit:	return err;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/5263ebb51eb098b01caf229498c954999117e4a7/pcf8591.c/clean/drivers/i2c/chips/pcf8591.c