unsigned char buf[2]; 
unsigned char buf[2]; 
static void PXC200_muxsel(struct bttv *btv, unsigned int input){        int rc;	long mux;	int bitmask;        unsigned char buf[2];	/* Read PIC config to determine if this is a PXC200F */	/* PX_I2C_CMD_CFG*/	buf[0]=0;	buf[1]=0;	rc=bttv_I2CWrite(btv,(PX_I2C_PIC<<1),buf[0],buf[1],1);	if (rc) {	  printk(KERN_DEBUG "bttv%d: PXC200_muxsel: pic cfg write failed:%d\n", btv->c.nr,rc);	  /* not PXC ? do nothing */	  return;	}	rc=bttv_I2CRead(btv,(PX_I2C_PIC<<1),NULL);	if (!(rc & PX_CFG_PXC200F)) {	  printk(KERN_DEBUG "bttv%d: PXC200_muxsel: not PXC200F rc:%d \n", btv->c.nr,rc);	  return;	}	/* The multiplexer in the 200F is handled by the GPIO port */	/* get correct mapping between inputs  */	/*  mux = bttv_tvcards[btv->type].muxsel[input] & 3; */	/* ** not needed!?   */	mux = input;	/* make sure output pins are enabled */	/* bitmask=0x30f; */	bitmask=0x302;	/* check whether we have a PXC200A */ 	if (btv->cardid == PX_PXC200A_CARDID)  {	   bitmask ^= 0x180; /* use 7 and 9, not 8 and 9 */	   bitmask |= 7<<4; /* the DAC */	}	btwrite(bitmask, BT848_GPIO_OUT_EN);	bitmask = btread(BT848_GPIO_DATA); 	if (btv->cardid == PX_PXC200A_CARDID)	  bitmask = (bitmask & ~0x280) | ((mux & 2) << 8) | ((mux & 1) << 7);	else /* older device */	  bitmask = (bitmask & ~0x300) | ((mux & 3) << 8);	btwrite(bitmask,BT848_GPIO_DATA);	/*	 * Was "to be safe, set the bt848 to input 0"	 * Actually, since it's ok at load time, better not messing	 * with these bits (on PXC200AF you need to set mux 2 here)	 *	 * needed because bttv-driver sets mux before calling this function	 */ 	if (btv->cardid == PX_PXC200A_CARDID)	  btaor(2<<5, ~BT848_IFORM_MUXSEL, BT848_IFORM);	else /* older device */	  btand(~BT848_IFORM_MUXSEL,BT848_IFORM);	printk(KERN_DEBUG "bttv%d: setting input channel to:%d\n", btv->c.nr,(int)mux);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/4ac97914c6c35f6bf132071c718e034d0846b9f5/bttv-cards.c/buggy/drivers/media/video/bttv-cards.c