Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 29555
b: refs/heads/master
c: 6d30772
h: refs/heads/master
i:
  29553: 88c3ceb
  29551: c4bedd4
v: v3
  • Loading branch information
David S. Miller committed Jun 24, 2006
1 parent 600af42 commit 9e2570c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6760d28bc691bb255c501c9b680f2fc1162258b2
refs/heads/master: 6d307724cb6a6b8466cad4fdf13d8a409bc2433f
12 changes: 12 additions & 0 deletions trunk/arch/sparc64/kernel/prom.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,18 @@ struct property *of_find_property(struct device_node *np, const char *name,
return pp;
}

int of_getintprop_default(struct device_node *np, const char *name, int def)
{
struct property *prop;
int len;

prop = of_find_property(np, name, &len);
if (!prop || len != 4)
return def;

return *(int *) prop->value;
}

static unsigned int prom_early_allocated;

static void * __init prom_early_alloc(unsigned long size)
Expand Down
3 changes: 3 additions & 0 deletions trunk/include/asm-sparc64/prom.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ extern struct device_node *of_get_next_child(const struct device_node *node,
extern struct property *of_find_property(struct device_node *np,
const char *name,
int *lenp);
extern int of_getintprop_default(struct device_node *np,
const char *name,
int def);

extern void prom_build_devicetree(void);

Expand Down

0 comments on commit 9e2570c

Please sign in to comment.