diff options
author | Anton Blanchard <anton@samba.org> | 2006-12-08 10:08:37 +0300 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-12-09 03:39:06 +0300 |
commit | 5773bbcdec54b7258cb9e2aa6f3459b4cbfd9dc5 (patch) | |
tree | 3dec47d76b8920fea13f163ed8015b078ed6055e /arch | |
parent | f050982a9b7c4edc414f0d5543c3cb24504223c6 (diff) | |
download | linux-5773bbcdec54b7258cb9e2aa6f3459b4cbfd9dc5.tar.xz |
[POWERPC] micro optimise pSeries_probe
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>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/platforms/pseries/setup.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c index 6090d753c44c..3e2f7467057d 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")) |