Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 81090
b: refs/heads/master
c: 2a9d2d9
h: refs/heads/master
v: v3
  • Loading branch information
Scott Wood authored and Paul Mackerras committed Dec 20, 2007
1 parent 153a95c commit 9c1c4b4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 754e5f3f3a96264b96d5593242d81c7468af70cb
refs/heads/master: 2a9d2d97d370e3fe959312762c3190e6a6ae9e11
8 changes: 5 additions & 3 deletions trunk/arch/powerpc/boot/libfdt-wrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@
check_err(_offset) ? NULL : (void *)(_offset+1); \
})

#define devp_offset(devp) (((int)(devp))-1)
#define devp_offset_find(devp) (((int)(devp))-1)
#define devp_offset(devp) (devp ? ((int)(devp))-1 : 0)

static void *fdt;
static void *buf; /* = NULL */
Expand Down Expand Up @@ -127,8 +128,9 @@ static void *fdt_wrapper_find_node_by_prop_value(const void *prev,
const char *val,
int len)
{
return offset_devp(fdt_node_offset_by_prop_value(fdt, devp_offset(prev),
name, val, len));
int offset = fdt_node_offset_by_prop_value(fdt, devp_offset_find(prev),
name, val, len);
return offset_devp(offset);
}

static char *fdt_wrapper_get_path(const void *devp, char *buf, int len)
Expand Down

0 comments on commit 9c1c4b4

Please sign in to comment.