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>
This commit is contained in:

committed by
Rob Herring

parent
1af4c7f18a
commit
74a7f08448
@@ -580,7 +580,7 @@ static unsigned int __init build_one_device_irq(struct platform_device *op,
|
||||
printk("%s: Apply [%s:%x] imap --> [%s:%x]\n",
|
||||
op->dev.of_node->full_name,
|
||||
pp->full_name, this_orig_irq,
|
||||
(iret ? iret->full_name : "NULL"), irq);
|
||||
of_node_full_name(iret), irq);
|
||||
|
||||
if (!iret)
|
||||
break;
|
||||
|
Reference in New Issue
Block a user