Skip to content

Commit

Permalink
[POWERPC] micro optimise pSeries_probe
Browse files Browse the repository at this point in the history
We find the OF root the line before, we may as well use it.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
  • Loading branch information
Anton Blanchard authored and Paul Mackerras committed Dec 9, 2006
1 parent f050982 commit 5773bbc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/powerpc/platforms/pseries/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -433,8 +433,8 @@ static int __init pSeries_probe_hypertas(unsigned long node,
static int __init pSeries_probe(void)
{
unsigned long root = of_get_flat_dt_root();
char *dtype = of_get_flat_dt_prop(of_get_flat_dt_root(),
"device_type", NULL);
char *dtype = of_get_flat_dt_prop(root, "device_type", NULL);

if (dtype == NULL)
return 0;
if (strcmp(dtype, "chrp"))
Expand Down

0 comments on commit 5773bbc

Please sign in to comment.