--- linux-4.4.0/drivers/misc/cxl/vphb.c.orig 2016-06-09 21:46:55.035955687 +0200 +++ linux-4.4.0/drivers/misc/cxl/vphb.c 2016-06-09 22:16:16.394616186 +0200 @@ -231,20 +231,21 @@ static struct pci_controller_ops cxl_pci int cxl_pci_vphb_add(struct cxl_afu *afu) { - struct pci_dev *phys_dev; - struct pci_controller *phb, *phys_phb; + struct pci_controller *phb; + struct device_node *vphb_dn; + struct device *parent; - phys_dev = to_pci_dev(afu->adapter->dev.parent); - phys_phb = pci_bus_to_host(phys_dev->bus); + parent = afu->adapter->dev.parent; + vphb_dn = parent->of_node; /* Alloc and setup PHB data structure */ - phb = pcibios_alloc_controller(phys_phb->dn); + phb = pcibios_alloc_controller(vphb_dn); if (!phb) return -ENODEV; /* Setup parent in sysfs */ - phb->parent = &phys_dev->dev; + phb->parent = parent; /* Setup the PHB using arch provided callback */ phb->ops = &cxl_pcie_pci_ops;