aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2012-06-15 13:50:25 -0400
committerRob Herring <rob.herring@calxeda.com>2012-07-06 08:16:34 -0400
commit74a7f08448adea6cb47cd9b260c98ff168117e92 (patch)
treedf2ce1ae517e390d1049e01c1428a4b31fd689cc /arch/powerpc/platforms
parent1af4c7f18a442771d86d496c761e9816349f98c9 (diff)
devicetree: add helper inline for retrieving a node's full name
The pattern (np ? np->full_name : "<none>") is rather common in the kernel, but can also make for quite long lines. This patch adds a new inline function, of_node_full_name() so that the test for a valid node pointer doesn't need to be open coded at all call sites. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Cc: Paul Mundt <lethal@linux-sh.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r--arch/powerpc/platforms/cell/iommu.c3
-rw-r--r--arch/powerpc/platforms/pseries/iommu.c2
2 files changed, 2 insertions, 3 deletions
diff --git a/arch/powerpc/platforms/cell/iommu.c b/arch/powerpc/platforms/cell/iommu.c
index b9f509a34c01..b6732004c882 100644
--- a/arch/powerpc/platforms/cell/iommu.c
+++ b/arch/powerpc/platforms/cell/iommu.c
@@ -552,8 +552,7 @@ static struct iommu_table *cell_get_iommu_table(struct device *dev)
552 iommu = cell_iommu_for_node(dev_to_node(dev)); 552 iommu = cell_iommu_for_node(dev_to_node(dev));
553 if (iommu == NULL || list_empty(&iommu->windows)) { 553 if (iommu == NULL || list_empty(&iommu->windows)) {
554 printk(KERN_ERR "iommu: missing iommu for %s (node %d)\n", 554 printk(KERN_ERR "iommu: missing iommu for %s (node %d)\n",
555 dev->of_node ? dev->of_node->full_name : "?", 555 of_node_full_name(dev->of_node), dev_to_node(dev));
556 dev_to_node(dev));
557 return NULL; 556 return NULL;
558 } 557 }
559 window = list_entry(iommu->windows.next, struct iommu_window, list); 558 window = list_entry(iommu->windows.next, struct iommu_window, list);
diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c
index 2d311c0caf8e..6b58a395dff6 100644
--- a/arch/powerpc/platforms/pseries/iommu.c
+++ b/arch/powerpc/platforms/pseries/iommu.c
@@ -1051,7 +1051,7 @@ static void pci_dma_dev_setup_pSeriesLP(struct pci_dev *dev)
1051 if (!pdn || !PCI_DN(pdn)) { 1051 if (!pdn || !PCI_DN(pdn)) {
1052 printk(KERN_WARNING "pci_dma_dev_setup_pSeriesLP: " 1052 printk(KERN_WARNING "pci_dma_dev_setup_pSeriesLP: "
1053 "no DMA window found for pci dev=%s dn=%s\n", 1053 "no DMA window found for pci dev=%s dn=%s\n",
1054 pci_name(dev), dn? dn->full_name : "<null>"); 1054 pci_name(dev), of_node_full_name(dn));
1055 return; 1055 return;
1056 } 1056 }
1057 pr_debug(" parent is %s\n", pdn->full_name); 1057 pr_debug(" parent is %s\n", pdn->full_name);