diff options
Diffstat (limited to 'arch/powerpc/platforms/chrp')
-rw-r--r-- | arch/powerpc/platforms/chrp/setup.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/powerpc/platforms/chrp/setup.c b/arch/powerpc/platforms/chrp/setup.c index e46c4d4a5804..9c1b231b1ff9 100644 --- a/arch/powerpc/platforms/chrp/setup.c +++ b/arch/powerpc/platforms/chrp/setup.c | |||
@@ -226,12 +226,12 @@ static void __init pegasos_set_l2cr(void) | |||
226 | return; | 226 | return; |
227 | 227 | ||
228 | /* Enable L2 cache if needed */ | 228 | /* Enable L2 cache if needed */ |
229 | np = find_type_devices("cpu"); | 229 | np = of_find_node_by_type(NULL, "cpu"); |
230 | if (np != NULL) { | 230 | if (np != NULL) { |
231 | const unsigned int *l2cr = of_get_property(np, "l2cr", NULL); | 231 | const unsigned int *l2cr = of_get_property(np, "l2cr", NULL); |
232 | if (l2cr == NULL) { | 232 | if (l2cr == NULL) { |
233 | printk ("Pegasos l2cr : no cpu l2cr property found\n"); | 233 | printk ("Pegasos l2cr : no cpu l2cr property found\n"); |
234 | return; | 234 | goto out; |
235 | } | 235 | } |
236 | if (!((*l2cr) & 0x80000000)) { | 236 | if (!((*l2cr) & 0x80000000)) { |
237 | printk ("Pegasos l2cr : L2 cache was not active, " | 237 | printk ("Pegasos l2cr : L2 cache was not active, " |
@@ -240,6 +240,8 @@ static void __init pegasos_set_l2cr(void) | |||
240 | _set_L2CR((*l2cr) | 0x80000000); | 240 | _set_L2CR((*l2cr) | 0x80000000); |
241 | } | 241 | } |
242 | } | 242 | } |
243 | out: | ||
244 | of_node_put(np); | ||
243 | } | 245 | } |
244 | 246 | ||
245 | static void briq_restart(char *cmd) | 247 | static void briq_restart(char *cmd) |