[PATCH] micro optimise pSeries_probe
Anton Blanchard
anton at samba.org
Fri Dec 8 18:08:37 EST 2006
We find the OF root the line before, we may as well use it.
Signed-off-by: Anton Blanchard <anton at samba.org>
---
Index: kernel/arch/powerpc/platforms/pseries/setup.c
===================================================================
--- kernel.orig/arch/powerpc/platforms/pseries/setup.c 2006-10-24 10:23:28.234782030 -0500
+++ kernel/arch/powerpc/platforms/pseries/setup.c 2006-10-24 10:26:19.068732015 -0500
@@ -503,8 +503,8 @@ static int __init pSeries_probe_hypertas
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"))
More information about the Linuxppc-dev
mailing list