/* * True for G400, for some other we need resource 0, see drivers/video/matrox/matroxfb_base.c 
/* * True for G400, for some other we need resource 0, see drivers/video/matrox/matroxfb_base.c 
static int __devinit matrox_w1_probe(struct pci_dev *pdev, const struct pci_device_id *ent){	struct matrox_device *dev;	int err;	assert(pdev != NULL);	assert(ent != NULL);	if (pdev->vendor != PCI_VENDOR_ID_MATROX || pdev->device != PCI_DEVICE_ID_MATROX_G400)		return -ENODEV;	dev = kmalloc(sizeof(struct matrox_device) +		       sizeof(struct w1_bus_master), GFP_KERNEL);	if (!dev) {		dev_err(&pdev->dev,			"%s: Failed to create new matrox_device object.\n",			__func__);		return -ENOMEM;	}	memset(dev, 0, sizeof(struct matrox_device) + sizeof(struct w1_bus_master));	dev->bus_master = (struct w1_bus_master *)(dev + 1);	/* 	 * True for G400, for some other we need resource 0, see drivers/video/matrox/matroxfb_base.c 	 */	dev->phys_addr = pci_resource_start(pdev, 1);	dev->virt_addr = ioremap_nocache(dev->phys_addr, 16384);	if (!dev->virt_addr) {		dev_err(&pdev->dev, "%s: failed to ioremap(0x%lx, %d).\n",			__func__, dev->phys_addr, 16384);		err = -EIO;		goto err_out_free_device;	}	dev->base_addr = dev->virt_addr + MATROX_BASE;	dev->port_index = dev->base_addr + MATROX_PORT_INDEX_OFFSET;	dev->port_data = dev->base_addr + MATROX_PORT_DATA_OFFSET;	dev->data_mask = (MATROX_G400_DDC_DATA);	matrox_w1_hw_init(dev);	dev->bus_master->data = (unsigned long) dev;	dev->bus_master->read_bit = &matrox_w1_read_ddc_bit;	dev->bus_master->write_bit = &matrox_w1_write_ddc_bit;	err = w1_add_master_device(dev->bus_master);	if (err)		goto err_out_free_device;	pci_set_drvdata(pdev, dev);	dev->found = 1;	dev_info(&pdev->dev, "Matrox G400 GPIO transport layer for 1-wire.\n");	return 0;err_out_free_device:	kfree(dev);	return err;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/7785925dd8e0d2f389d4a9168f1683c6b249a552/matrox_w1.c/buggy/drivers/w1/matrox_w1.c