budget_av->budget.dvb_adapter->num); 
budget_av->budget.dvb_adapter.num); 
static int budget_av_attach(struct saa7146_dev *dev, struct saa7146_pci_extension_data *info){	struct budget_av *budget_av;	u8 *mac;	int err;	dprintk(2, "dev: %p\n", dev);	if (!(budget_av = kmalloc(sizeof(struct budget_av), GFP_KERNEL)))		return -ENOMEM;	memset(budget_av, 0, sizeof(struct budget_av));	budget_av->budget.ci_present = 0;	dev->ext_priv = budget_av;	if ((err = ttpci_budget_init(&budget_av->budget, dev, info, THIS_MODULE))) {		kfree(budget_av);		return err;	}	/* knc1 initialization */	saa7146_write(dev, DD1_STREAM_B, 0x04000000);	saa7146_write(dev, DD1_INIT, 0x07000600);	saa7146_write(dev, MC2, MASK_09 | MASK_25 | MASK_10 | MASK_26);	saa7146_setgpio(dev, 0, SAA7146_GPIO_OUTHI);	msleep(500);	if (0 == saa7113_init(budget_av)) {		budget_av->has_saa7113 = 1;		if (0 != saa7146_vv_init(dev, &vv_data)) {			/* fixme: proper cleanup here */			ERR(("cannot init vv subsystem.\n"));			return err;		}		if ((err = saa7146_register_device(&budget_av->vd, dev, "knc1", VFL_TYPE_GRABBER))) {			/* fixme: proper cleanup here */			ERR(("cannot register capture v4l2 device.\n"));			return err;		}		/* beware: this modifies dev->vv ... */		saa7146_set_hps_source_and_sync(dev, SAA7146_HPS_SOURCE_PORT_A,						SAA7146_HPS_SYNC_PORT_A);		saa7113_setinput(budget_av, 0);	} else {		budget_av->has_saa7113 = 0;		saa7146_setgpio(dev, 0, SAA7146_GPIO_OUTLO);	}	/* fixme: find some sane values here... */	saa7146_write(dev, PCI_BT_V1, 0x1c00101f);	mac = budget_av->budget.dvb_adapter->proposed_mac;	if (i2c_readregs(&budget_av->budget.i2c_adap, 0xa0, 0x30, mac, 6)) {		printk("KNC1-%d: Could not read MAC from KNC1 card\n",		       budget_av->budget.dvb_adapter->num);		memset(mac, 0, 6);	} else {		printk("KNC1-%d: MAC addr = %.2x:%.2x:%.2x:%.2x:%.2x:%.2x\n",		       budget_av->budget.dvb_adapter->num,		       mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);	}	budget_av->budget.dvb_adapter->priv = budget_av;	frontend_init(budget_av);	if (enable_ci)		ciintf_init(budget_av);	return 0;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/fdc53a6dbfea18e621dd23ed5cfb160837d7ce52/budget-av.c/buggy/drivers/media/dvb/ttpci/budget-av.c