dprintk("ctl3: %02x stdc: %02x chcv: %02x\n", ctl3, stdc, chcv); dprintk("norm: %d\n", norm);  
static int saa7191_set_norm(struct i2c_client *client, int norm){	struct saa7191 *decoder = i2c_get_clientdata(client);	unsigned char stdc = saa7191_read_reg(client, SAA7191_REG_STDC);	unsigned char ctl3 = saa7191_read_reg(client, SAA7191_REG_CTL3);	unsigned char chcv = saa7191_read_reg(client, SAA7191_REG_CHCV);	int err;	switch(norm) {	case SAA7191_NORM_AUTO: {		unsigned char status;		// does status depend on current norm ?		if (saa7191_read_status(client, &status))			return -EIO;		stdc &= ~SAA7191_STDC_SECS;		ctl3 &= ~SAA7191_CTL3_FSEL;		ctl3 |= SAA7191_CTL3_AUFD;		chcv = (status & SAA7191_STATUS_FIDT)			       ? SAA7191_CHCV_NTSC : SAA7191_CHCV_PAL;		break;	}	case SAA7191_NORM_PAL:		stdc &= ~SAA7191_STDC_SECS;		ctl3 &= ~(SAA7191_CTL3_AUFD | SAA7191_CTL3_FSEL);		chcv = SAA7191_CHCV_PAL;		break;	case SAA7191_NORM_NTSC:		stdc &= ~SAA7191_STDC_SECS;		ctl3 &= ~SAA7191_CTL3_AUFD;		ctl3 |= SAA7191_CTL3_FSEL;		chcv = SAA7191_CHCV_NTSC;		break;	case SAA7191_NORM_SECAM:		stdc |= SAA7191_STDC_SECS;		ctl3 &= ~(SAA7191_CTL3_AUFD | SAA7191_CTL3_FSEL);		chcv = SAA7191_CHCV_PAL;		break;	default:		return -EINVAL;	}	err = saa7191_write_reg(client, SAA7191_REG_CTL3, ctl3);	if (err)		return -EIO;	err = saa7191_write_reg(client, SAA7191_REG_STDC, stdc);	if (err)		return -EIO;	err = saa7191_write_reg(client, SAA7191_REG_CHCV, chcv);	if (err)		return -EIO;	decoder->norm = norm;	return 0;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/a637a114f36b94a1ad8b9867f43bac0414958420/saa7191.c/buggy/drivers/media/video/saa7191.c