*/ 
*/ 
int saa7134_board_init2(struct saa7134_dev *dev){	unsigned char buf;	int board;	switch (dev->board) {	case SAA7134_BOARD_BMK_MPEX_NOTUNER:	case SAA7134_BOARD_BMK_MPEX_TUNER:		dev->i2c_client.addr = 0x60;		board = (i2c_master_recv(&dev->i2c_client,&buf,0) < 0)			? SAA7134_BOARD_BMK_MPEX_NOTUNER			: SAA7134_BOARD_BMK_MPEX_TUNER;		if (board == dev->board)			break;		dev->board = board;		printk("%s: board type fixup: %s\n", dev->name,		saa7134_boards[dev->board].name);		dev->tuner_type = saa7134_boards[dev->board].tuner_type;		if (TUNER_ABSENT != dev->tuner_type) {				struct tuner_setup tun_setup;				tun_setup.mode_mask = T_RADIO | T_ANALOG_TV | T_DIGITAL_TV;				tun_setup.type = dev->tuner_type;				tun_setup.addr = ADDR_UNSET;				saa7134_i2c_call_clients (dev, TUNER_SET_TYPE_ADDR, &tun_setup);		}		break;	case SAA7134_BOARD_MD7134:		{		struct tuner_setup tun_setup;		u8 subaddr;		u8 data[3];		int ret, tuner_t;		struct i2c_msg msg[] = {{.addr=0x50, .flags=0, .buf=&subaddr, .len = 1},					{.addr=0x50, .flags=I2C_M_RD, .buf=data, .len = 3}};		subaddr= 0x14;		tuner_t = 0;		ret = i2c_transfer(&dev->i2c_adap, msg, 2);		if (ret != 2) {			printk(KERN_ERR "EEPROM read failure\n");		} else if ((data[0] != 0) && (data[0] != 0xff)) {			/* old config structure */			subaddr = data[0] + 2;			msg[1].len = 2;			i2c_transfer(&dev->i2c_adap, msg, 2);			tuner_t = (data[0] << 8) + data[1];			switch (tuner_t){			case 0x0103:				dev->tuner_type = TUNER_PHILIPS_PAL;				break;			case 0x010C:				dev->tuner_type = TUNER_PHILIPS_FM1216ME_MK3;				break;			default:				printk(KERN_ERR "%s Cant determine tuner type %x from EEPROM\n", dev->name, tuner_t);			}		} else if ((data[1] != 0) && (data[1] != 0xff)) {			/* new config structure */			subaddr = data[1] + 1;			msg[1].len = 1;			i2c_transfer(&dev->i2c_adap, msg, 2);			subaddr = data[0] + 1;			msg[1].len = 2;			i2c_transfer(&dev->i2c_adap, msg, 2);			tuner_t = (data[1] << 8) + data[0];			switch (tuner_t) {			case 0x0005:				dev->tuner_type = TUNER_PHILIPS_FM1216ME_MK3;				break;			case 0x001d:				dev->tuner_type = TUNER_PHILIPS_FMD1216ME_MK3;					printk(KERN_INFO "%s Board has DVB-T\n", dev->name);				break;			default:				printk(KERN_ERR "%s Cant determine tuner type %x from EEPROM\n", dev->name, tuner_t);			}		} else {			printk(KERN_ERR "%s unexpected config structure\n", dev->name);		}		printk(KERN_INFO "%s Tuner type is %d\n", dev->name, dev->tuner_type);		if (dev->tuner_type == TUNER_PHILIPS_FMD1216ME_MK3) {			dev->tda9887_conf = TDA9887_PRESENT | TDA9887_PORT1_ACTIVE | TDA9887_PORT2_ACTIVE;			saa7134_i2c_call_clients(dev,TDA9887_SET_CONFIG, &dev->tda9887_conf);		}		tun_setup.mode_mask = T_RADIO | T_ANALOG_TV | T_DIGITAL_TV;		tun_setup.type = dev->tuner_type;		tun_setup.addr = ADDR_UNSET;		saa7134_i2c_call_clients (dev, TUNER_SET_TYPE_ADDR,&tun_setup);		}		break;	case SAA7134_BOARD_PHILIPS_EUROPA:	case SAA7134_BOARD_VIDEOMATE_DVBT_300:		/* The Philips EUROPA based hybrid boards have the tuner connected through		 * the channel decoder. We have to make it transparent to find it	 	 */		{		struct tuner_setup tun_setup;		u8 data[] = { 0x07, 0x02};		struct i2c_msg msg = {.addr=0x08, .flags=0, .buf=data, .len = sizeof(data)};		i2c_transfer(&dev->i2c_adap, &msg, 1);		tun_setup.mode_mask = T_ANALOG_TV | T_DIGITAL_TV;		tun_setup.type = dev->tuner_type;		tun_setup.addr = dev->tuner_addr;		saa7134_i2c_call_clients (dev, TUNER_SET_TYPE_ADDR,&tun_setup); 		}		break;	}	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/4ac97914c6c35f6bf132071c718e034d0846b9f5/saa7134-cards.c/clean/drivers/media/video/saa7134/saa7134-cards.c