diff options
Diffstat (limited to 'arch/powerpc/kernel/prom_init.c')
-rw-r--r-- | arch/powerpc/kernel/prom_init.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c index c758b6624d7b..6dc33d19fc2a 100644 --- a/arch/powerpc/kernel/prom_init.c +++ b/arch/powerpc/kernel/prom_init.c | |||
@@ -403,19 +403,19 @@ static int __init prom_next_node(phandle *nodep) | |||
403 | } | 403 | } |
404 | } | 404 | } |
405 | 405 | ||
406 | static int __init prom_getprop(phandle node, const char *pname, | 406 | static int inline prom_getprop(phandle node, const char *pname, |
407 | void *value, size_t valuelen) | 407 | void *value, size_t valuelen) |
408 | { | 408 | { |
409 | return call_prom("getprop", 4, 1, node, ADDR(pname), | 409 | return call_prom("getprop", 4, 1, node, ADDR(pname), |
410 | (u32)(unsigned long) value, (u32) valuelen); | 410 | (u32)(unsigned long) value, (u32) valuelen); |
411 | } | 411 | } |
412 | 412 | ||
413 | static int __init prom_getproplen(phandle node, const char *pname) | 413 | static int inline prom_getproplen(phandle node, const char *pname) |
414 | { | 414 | { |
415 | return call_prom("getproplen", 2, 1, node, ADDR(pname)); | 415 | return call_prom("getproplen", 2, 1, node, ADDR(pname)); |
416 | } | 416 | } |
417 | 417 | ||
418 | static int __init prom_setprop(phandle node, const char *pname, | 418 | static int inline prom_setprop(phandle node, const char *pname, |
419 | void *value, size_t valuelen) | 419 | void *value, size_t valuelen) |
420 | { | 420 | { |
421 | return call_prom("setprop", 4, 1, node, ADDR(pname), | 421 | return call_prom("setprop", 4, 1, node, ADDR(pname), |
@@ -1408,8 +1408,9 @@ static int __init prom_find_machine_type(void) | |||
1408 | struct prom_t *_prom = &RELOC(prom); | 1408 | struct prom_t *_prom = &RELOC(prom); |
1409 | char compat[256]; | 1409 | char compat[256]; |
1410 | int len, i = 0; | 1410 | int len, i = 0; |
1411 | #ifdef CONFIG_PPC64 | ||
1411 | phandle rtas; | 1412 | phandle rtas; |
1412 | 1413 | #endif | |
1413 | len = prom_getprop(_prom->root, "compatible", | 1414 | len = prom_getprop(_prom->root, "compatible", |
1414 | compat, sizeof(compat)-1); | 1415 | compat, sizeof(compat)-1); |
1415 | if (len > 0) { | 1416 | if (len > 0) { |
@@ -1872,7 +1873,7 @@ static void __init fixup_device_tree(void) | |||
1872 | if (prom_getprop(u3, "device-rev", &u3_rev, sizeof(u3_rev)) | 1873 | if (prom_getprop(u3, "device-rev", &u3_rev, sizeof(u3_rev)) |
1873 | == PROM_ERROR) | 1874 | == PROM_ERROR) |
1874 | return; | 1875 | return; |
1875 | if (u3_rev != 0x35 && u3_rev != 0x37) | 1876 | if (u3_rev < 0x35 || u3_rev > 0x39) |
1876 | return; | 1877 | return; |
1877 | /* does it need fixup ? */ | 1878 | /* does it need fixup ? */ |
1878 | if (prom_getproplen(i2c, "interrupts") > 0) | 1879 | if (prom_getproplen(i2c, "interrupts") > 0) |