aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2005-10-14 18:59:09 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-10-14 20:10:12 -0400
commit1350843cf0fa46e2f633c78b335777aac3d054b2 (patch)
treea2983db190088e01a44f05450c09e2deea3a8c24
parenta90933fb4e7b85587e5cbdf863deeb16695c19bd (diff)
[PATCH] ppc64: Fix G5 model in /proc/cpuinfo
Andreas Schwab spotted that recent kernels broke reporting of the PowerMac machine model in /proc/cpuinfo. This fixes it. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--arch/ppc64/kernel/pmac_setup.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/ppc64/kernel/pmac_setup.c b/arch/ppc64/kernel/pmac_setup.c
index 25755252067a..fa8121d53b89 100644
--- a/arch/ppc64/kernel/pmac_setup.c
+++ b/arch/ppc64/kernel/pmac_setup.c
@@ -115,7 +115,7 @@ static void __pmac pmac_show_cpuinfo(struct seq_file *m)
115 115
116 /* find motherboard type */ 116 /* find motherboard type */
117 seq_printf(m, "machine\t\t: "); 117 seq_printf(m, "machine\t\t: ");
118 np = find_devices("device-tree"); 118 np = of_find_node_by_path("/");
119 if (np != NULL) { 119 if (np != NULL) {
120 pp = (char *) get_property(np, "model", NULL); 120 pp = (char *) get_property(np, "model", NULL);
121 if (pp != NULL) 121 if (pp != NULL)
@@ -133,6 +133,7 @@ static void __pmac pmac_show_cpuinfo(struct seq_file *m)
133 } 133 }
134 seq_printf(m, "\n"); 134 seq_printf(m, "\n");
135 } 135 }
136 of_node_put(np);
136 } else 137 } else
137 seq_printf(m, "PowerMac\n"); 138 seq_printf(m, "PowerMac\n");
138 139