cxl: Fix device_node reference counting
[firefly-linux-kernel-4.4.55.git] / arch / powerpc / platforms / powernv / pci-ioda.c
index 85b473823fdad0a5b1785496b556d700d8c2cb6c..6c9ff2b95119fa85aba69fd9f3ab7d9e6a18bcaa 100644 (file)
@@ -1487,13 +1487,13 @@ static void set_msi_irq_chip(struct pnv_phb *phb, unsigned int virq)
 
 #ifdef CONFIG_CXL_BASE
 
-struct device_node *pnv_pci_to_phb_node(struct pci_dev *dev)
+struct device_node *pnv_pci_get_phb_node(struct pci_dev *dev)
 {
        struct pci_controller *hose = pci_bus_to_host(dev->bus);
 
-       return hose->dn;
+       return of_node_get(hose->dn);
 }
-EXPORT_SYMBOL(pnv_pci_to_phb_node);
+EXPORT_SYMBOL(pnv_pci_get_phb_node);
 
 int pnv_phb_to_cxl_mode(struct pci_dev *dev, uint64_t mode)
 {