diff options
author | Paul Mackerras <paulus@samba.org> | 2008-02-06 12:08:37 +0100 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2008-02-06 12:08:37 +0100 |
commit | b370b08274a25cf1e2015fb7ce65c43173c8156f (patch) | |
tree | 0c8f990148da4ca1275ac5471c93c519754f4aec /arch/powerpc/sysdev | |
parent | [POWERPC] arch/powerpc/platforms/82xx: Add missing of_node_put (diff) | |
parent | [POWERPC] 85xx: Add second cpu to 8572 dts (diff) | |
download | linux-b370b08274a25cf1e2015fb7ce65c43173c8156f.tar.xz linux-b370b08274a25cf1e2015fb7ce65c43173c8156f.zip |
Merge branch 'for-2.6.25' of master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc into for-2.6.25
Diffstat (limited to 'arch/powerpc/sysdev')
-rw-r--r-- | arch/powerpc/sysdev/fsl_soc.c | 2 | ||||
-rw-r--r-- | arch/powerpc/sysdev/qe_lib/qe.c | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c index e48b20e934ca..2c5388ce902a 100644 --- a/arch/powerpc/sysdev/fsl_soc.c +++ b/arch/powerpc/sysdev/fsl_soc.c @@ -1342,7 +1342,7 @@ static int __init of_fsl_spi_probe(char *type, char *compatible, u32 sysclk, if (ret) goto unreg; - ret = platform_device_register(pdev); + ret = platform_device_add(pdev); if (ret) goto unreg; diff --git a/arch/powerpc/sysdev/qe_lib/qe.c b/arch/powerpc/sysdev/qe_lib/qe.c index 5ef844da9355..6efbd5e5bb1b 100644 --- a/arch/powerpc/sysdev/qe_lib/qe.c +++ b/arch/powerpc/sysdev/qe_lib/qe.c @@ -66,7 +66,7 @@ phys_addr_t get_qe_base(void) { struct device_node *qe; unsigned int size; - const void *prop; + const u32 *prop; if (qebase != -1) return qebase; @@ -79,7 +79,8 @@ phys_addr_t get_qe_base(void) } prop = of_get_property(qe, "reg", &size); - qebase = of_translate_address(qe, prop); + if (prop && size >= sizeof(*prop)) + qebase = of_translate_address(qe, prop); of_node_put(qe); return qebase; @@ -172,10 +173,9 @@ unsigned int get_brg_clk(void) } prop = of_get_property(qe, "brg-frequency", &size); - if (!prop || size != sizeof(*prop)) - return brg_clk; + if (prop && size == sizeof(*prop)) + brg_clk = *prop; - brg_clk = *prop; of_node_put(qe); return brg_clk; |