buf[0] = 0x02; 
buf[0] = 0x02; 
static int saa6752hs_chip_command(struct i2c_client* client,				  enum saa6752hs_command command){	unsigned char buf[3];	unsigned long timeout;	int status = 0;	/* execute the command */	switch(command) {  	case SAA6752HS_COMMAND_RESET:  		buf[0] = 0x00;		break;	case SAA6752HS_COMMAND_STOP:	  	buf[0] = 0x03;		break;	case SAA6752HS_COMMAND_START:  		buf[0] = 0x02;		break;	case SAA6752HS_COMMAND_PAUSE:  		buf[0] = 0x04;		break;	case SAA6752HS_COMMAND_RECONFIGURE:		buf[0] = 0x05;		break;  	case SAA6752HS_COMMAND_SLEEP:  		buf[0] = 0x06;		break;  	case SAA6752HS_COMMAND_RECONFIGURE_FORCE:		buf[0] = 0x07;		break;	default:		return -EINVAL;	}  	/* set it and wait for it to be so */	i2c_master_send(client, buf, 1);	timeout = jiffies + HZ * 3;	for (;;) {		/* get the current status */		buf[0] = 0x10;	  	i2c_master_send(client, buf, 1);		i2c_master_recv(client, buf, 1);		if (!(buf[0] & 0x20))			break;		if (time_after(jiffies,timeout)) {			status = -ETIMEDOUT;			break;		}		msleep(10);	}	/* delay a bit to let encoder settle */	msleep(50);  	return status;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/4ac97914c6c35f6bf132071c718e034d0846b9f5/saa6752hs.c/buggy/drivers/media/video/saa7134/saa6752hs.c