From: Anton Blanchard Date: Fri, 8 Dec 2006 07:08:37 +0000 (+1100) Subject: [POWERPC] micro optimise pSeries_probe X-Git-Tag: v2.6.20-rc1~146^2~14^2~8 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=5773bbcdec54b7258cb9e2aa6f3459b4cbfd9dc5;p=~emulex%2Finfiniband.git [POWERPC] micro optimise pSeries_probe We find the OF root the line before, we may as well use it. Signed-off-by: Anton Blanchard Signed-off-by: Paul Mackerras --- diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c index 6090d753c44..3e2f7467057 100644 --- a/arch/powerpc/platforms/pseries/setup.c +++ b/arch/powerpc/platforms/pseries/setup.c @@ -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"))