int pcf8574_detect(struct i2c_adapter *adapter, int address, int kind) 
static int pcf8574_detect(struct i2c_adapter *adapter, int address, int kind) 
int pcf8574_detect(struct i2c_adapter *adapter, int address, int kind){	struct i2c_client *new_client;	struct pcf8574_data *data;	int err = 0;	const char *client_name = "";	if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE))		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 = kzalloc(sizeof(struct pcf8574_data), GFP_KERNEL))) {		err = -ENOMEM;		goto exit;	}	new_client = &data->client;	i2c_set_clientdata(new_client, data);	new_client->addr = address;	new_client->adapter = adapter;	new_client->driver = &pcf8574_driver;	new_client->flags = 0;	/* Now, we would do the remaining detection. But the PCF8574 is plainly	   impossible to detect! Stupid chip. */	/* Determine the chip type */	if (kind <= 0) {		if (address >= 0x38 && address <= 0x3f)			kind = pcf8574a;		else			kind = pcf8574;	}	if (kind == pcf8574a)		client_name = "pcf8574a";	else		client_name = "pcf8574";	/* Fill in the remaining client fields and put it into the global list */	strlcpy(new_client->name, client_name, I2C_NAME_SIZE);	/* Tell the I2C layer a new client has arrived */	if ((err = i2c_attach_client(new_client)))		goto exit_free;		/* Initialize the PCF8574 chip */	pcf8574_init_client(new_client);	/* Register sysfs hooks */	device_create_file(&new_client->dev, &dev_attr_read);	device_create_file(&new_client->dev, &dev_attr_write);	return 0;/* OK, this is not exactly good programming practice, usually. But it is   very code-efficient in this case. */      exit_free:	kfree(data);      exit:	return err;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/6344a8ece0bacccf61817450e8ccf78c973fc0c5/pcf8574.c/buggy/drivers/i2c/chips/pcf8574.c