diff options
Diffstat (limited to 'arch/sparc/kernel/prom_64.c')
-rw-r--r-- | arch/sparc/kernel/prom_64.c | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/arch/sparc/kernel/prom_64.c b/arch/sparc/kernel/prom_64.c index 61cc967b149d..e3969db4d58b 100644 --- a/arch/sparc/kernel/prom_64.c +++ b/arch/sparc/kernel/prom_64.c | |||
@@ -399,66 +399,6 @@ static char * __init build_full_name(struct device_node *dp) | |||
399 | return n; | 399 | return n; |
400 | } | 400 | } |
401 | 401 | ||
402 | static struct property * __init build_one_prop(phandle node, char *prev, char *special_name, void *special_val, int special_len) | ||
403 | { | ||
404 | static struct property *tmp = NULL; | ||
405 | struct property *p; | ||
406 | |||
407 | if (tmp) { | ||
408 | p = tmp; | ||
409 | memset(p, 0, sizeof(*p) + 32); | ||
410 | tmp = NULL; | ||
411 | } else { | ||
412 | p = prom_early_alloc(sizeof(struct property) + 32); | ||
413 | p->unique_id = prom_unique_id++; | ||
414 | } | ||
415 | |||
416 | p->name = (char *) (p + 1); | ||
417 | if (special_name) { | ||
418 | strcpy(p->name, special_name); | ||
419 | p->length = special_len; | ||
420 | p->value = prom_early_alloc(special_len); | ||
421 | memcpy(p->value, special_val, special_len); | ||
422 | } else { | ||
423 | if (prev == NULL) { | ||
424 | prom_firstprop(node, p->name); | ||
425 | } else { | ||
426 | prom_nextprop(node, prev, p->name); | ||
427 | } | ||
428 | if (strlen(p->name) == 0) { | ||
429 | tmp = p; | ||
430 | return NULL; | ||
431 | } | ||
432 | p->length = prom_getproplen(node, p->name); | ||
433 | if (p->length <= 0) { | ||
434 | p->length = 0; | ||
435 | } else { | ||
436 | p->value = prom_early_alloc(p->length + 1); | ||
437 | prom_getproperty(node, p->name, p->value, p->length); | ||
438 | ((unsigned char *)p->value)[p->length] = '\0'; | ||
439 | } | ||
440 | } | ||
441 | return p; | ||
442 | } | ||
443 | |||
444 | static struct property * __init build_prop_list(phandle node) | ||
445 | { | ||
446 | struct property *head, *tail; | ||
447 | |||
448 | head = tail = build_one_prop(node, NULL, | ||
449 | ".node", &node, sizeof(node)); | ||
450 | |||
451 | tail->next = build_one_prop(node, NULL, NULL, NULL, 0); | ||
452 | tail = tail->next; | ||
453 | while(tail) { | ||
454 | tail->next = build_one_prop(node, tail->name, | ||
455 | NULL, NULL, 0); | ||
456 | tail = tail->next; | ||
457 | } | ||
458 | |||
459 | return head; | ||
460 | } | ||
461 | |||
462 | static char * __init get_one_property(phandle node, const char *name) | 402 | static char * __init get_one_property(phandle node, const char *name) |
463 | { | 403 | { |
464 | char *buf = "<NULL>"; | 404 | char *buf = "<NULL>"; |