/* pcie_device_init - allocate and initialize PCI Express port service device @pdev: PCI Express port to associate the service device with @service: Type of service to associate with the service device @irq: Interrupt vector to associate with the service device  */
static int pcie_device_init(struct pci_dev *pdev, int service, int irq)
/* pcie_device_init - allocate and initialize PCI Express port service device @pdev: PCI Express port to associate the service device with @service: Type of service to associate with the service device @irq: Interrupt vector to associate with the service device  */
static int pcie_device_init(struct pci_dev *pdev, int service, int irq)
{
	int retval;
	struct pcie_device *pcie;
	struct device *device;
	pcie = kzalloc(sizeof(*pcie), GFP_KERNEL);
	if (!pcie)
		return -ENOMEM;
	pcie->port = pdev;
	pcie->irq = irq;
	pcie->service = service;
	device = &pcie->device;
	device->bus = &pcie_port_bus_type;
	device->release = release_pcie_device;
	dev_set_name(device, "%s:pcie%02x",
		     pci_name(pdev),
		     get_descriptor_id(pdev->pcie_type, service));
	device->parent = &pdev->dev;
	retval = device_register(device);
	if (retval)
		kfree(pcie);
	else
		get_device(device);
	return retval;
}