#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/of_pdt.h>
static struct of_pdt_ops *of_pdt_prom_ops __initdata;
#if defined(CONFIG_SPARC)
unsigned int of_pdt_unique_id __initdata;
#define of_pdt_incr_unique_id(p) do { \
(p)->unique_id = of_pdt_unique_id++; \
static char * __init of_pdt_build_full_name(struct device_node *dp)
return build_path_component(dp);
static inline void of_pdt_incr_unique_id(void *p) { }
static inline void irq_trans_init(struct device_node *dp) { }
static char * __init of_pdt_build_full_name(struct device_node *dp)
static int failsafe_id = 0;
if (!of_pdt_prom_ops->pkg2path(dp->phandle, path, sizeof(path), &len)) {
buf = prom_early_alloc(strlen(name) + 1);
name = of_get_property(dp, "name", &len);
buf = prom_early_alloc(len + 16);
sprintf(buf, "%s@unknown%i", name, failsafe_id++);
pr_err("%s: pkg2path failed; assigning %s\n", __func__, buf);