stv0299_sleep_until (&nexttime, 8000); 
dvb_frontend_sleep_until(&nexttime, 8000); 
static int stv0299_send_legacy_dish_cmd (struct dvb_frontend* fe, u32 cmd){	struct stv0299_state* state = fe->demodulator_priv;	u8 reg0x08;	u8 reg0x0c;	u8 lv_mask = 0x40;	u8 last = 1;	int i;	struct timeval nexttime;	struct timeval tv[10];	reg0x08 = stv0299_readreg (state, 0x08);	reg0x0c = stv0299_readreg (state, 0x0c);	reg0x0c &= 0x0f;	stv0299_writeregI (state, 0x08, (reg0x08 & 0x3f) | (state->config->lock_output << 6));	if (state->config->volt13_op0_op1 == STV0299_VOLT13_OP0)		lv_mask = 0x10;	cmd = cmd << 1;	if (debug_legacy_dish_switch)		printk ("%s switch command: 0x%04x\n",__FUNCTION__, cmd);	do_gettimeofday (&nexttime);	if (debug_legacy_dish_switch)		memcpy (&tv[0], &nexttime, sizeof (struct timeval));	stv0299_writeregI (state, 0x0c, reg0x0c | 0x50); /* set LNB to 18V */	stv0299_sleep_until (&nexttime, 32000);	for (i=0; i<9; i++) {		if (debug_legacy_dish_switch)			do_gettimeofday (&tv[i+1]);		if((cmd & 0x01) != last) {			/* set voltage to (last ? 13V : 18V) */			stv0299_writeregI (state, 0x0c, reg0x0c | (last ? lv_mask : 0x50));			last = (last) ? 0 : 1;		}		cmd = cmd >> 1;		if (i != 8)			stv0299_sleep_until (&nexttime, 8000);	}	if (debug_legacy_dish_switch) {		printk ("%s(%d): switch delay (should be 32k followed by all 8k\n",			__FUNCTION__, fe->dvb->num);		for (i=1; i < 10; i++)			printk ("%d: %d\n", i, stv0299_calc_usec_delay (tv[i-1] , tv[i]));	}	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/83b75b049be981e579ba2cb88aa9bf3534bbbdb1/stv0299.c/clean/drivers/media/dvb/frontends/stv0299.c