 /* Check if board has eeprom */ err = i2c_master_recv(&dev->i2c_client, &buf, 0); if (err < 0) return -1;  
static int em2820_i2c_eeprom(struct em2820 *dev, unsigned char *eedata, int len){	unsigned char buf, *p = eedata;	struct em2820_eeprom *em_eeprom = (void *)eedata;	int i, err, size = len, block;	dev->i2c_client.addr = 0xa0 >> 1;	buf = 0;	if (1 != (err = i2c_master_send(&dev->i2c_client, &buf, 1))) {		printk(KERN_INFO "%s: Huh, no eeprom present (err=%d)?\n",		       dev->name, err);		return -1;	}	while (size > 0) {		if (size > 16)			block = 16;		else			block = size;		if (block !=		    (err = i2c_master_recv(&dev->i2c_client, p, block))) {			printk(KERN_WARNING			       "%s: i2c eeprom read error (err=%d)\n",			       dev->name, err);			return -1;		}		size -= block;		p += block;	}	for (i = 0; i < len; i++) {		if (0 == (i % 16))			printk(KERN_INFO "%s: i2c eeprom %02x:", dev->name, i);		printk(" %02x", eedata[i]);		if (15 == (i % 16))			printk("\n");	}	printk(KERN_INFO "EEPROM ID= 0x%08x\n", em_eeprom->id);	printk(KERN_INFO "Vendor/Product ID= %04x:%04x\n", em_eeprom->vendor_ID,	       em_eeprom->product_ID);	switch (em_eeprom->chip_conf >> 4 & 0x3) {	case 0:		printk(KERN_INFO "No audio on board.\n");		break;	case 1:		printk(KERN_INFO "AC97 audio (5 sample rates)\n");		break;	case 2:		printk(KERN_INFO "I2S audio, sample rate=32k\n");		break;	case 3:		printk(KERN_INFO "I2S audio, 3 sample rates\n");		break;	}	if (em_eeprom->chip_conf & 1 << 3)		printk(KERN_INFO "USB Remote wakeup capable\n");	if (em_eeprom->chip_conf & 1 << 2)		printk(KERN_INFO "USB Self power capable\n");	switch (em_eeprom->chip_conf & 0x3) {	case 0:		printk(KERN_INFO "500mA max power\n");		break;	case 1:		printk(KERN_INFO "400mA max power\n");		break;	case 2:		printk(KERN_INFO "300mA max power\n");		break;	case 3:		printk(KERN_INFO "200mA max power\n");		break;	}	return 0;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/596d92d5128d308b5a79f21c3e72c87f5fc7e58b/em28xx-i2c.c/buggy/drivers/media/video/em28xx/em28xx-i2c.c