type,		/* port type */ 
type,		/* port type */ 
int pcie_port_device_register(struct pci_dev *dev){	int status, type, capabilities, irq_mode, i;	int vectors[PCIE_PORT_DEVICE_MAXSERVICES];	u16 reg16;	/* Get port type */	pci_read_config_word(dev, 		pci_find_capability(dev, PCI_CAP_ID_EXP) + 		PCIE_CAPABILITIES_REG, &reg16);	type = (reg16 >> 4) & PORT_TYPE_MASK;	/* Now get port services */	capabilities = get_port_device_capability(dev);	irq_mode = assign_interrupt_mode(dev, vectors, capabilities);	/* Allocate child services if any */	for (i = 0; i < PCIE_PORT_DEVICE_MAXSERVICES; i++) {		struct pcie_device *child;		if (capabilities & (1 << i)) {			child = alloc_pcie_device(				dev, 		/* parent */				type,		/* port type */ 				i,		/* service type */				vectors[i],	/* irq */				irq_mode	/* interrupt mode */);			if (child) { 				status = device_register(&child->device);				if (status) {					kfree(child);					continue;				}				get_device(&child->device);			}		}	}	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/d0e2b4a0a9dd3eed71b56c47268bf4e40cff6d0f/portdrv_core.c/buggy/drivers/pci/pcie/portdrv_core.c