powerpc/qe: Make qe_reset() code path safe for repeated invocation
[pandora-kernel.git] / arch / powerpc / sysdev / cpm_common.c
index e4b6d66..9de72c9 100644 (file)
@@ -72,7 +72,7 @@ static phys_addr_t muram_pbase;
 /* Max address size we deal with */
 #define OF_MAX_ADDR_CELLS      4
 
-int __init cpm_muram_init(void)
+int cpm_muram_init(void)
 {
        struct device_node *np;
        struct resource r;
@@ -81,6 +81,9 @@ int __init cpm_muram_init(void)
        int i = 0;
        int ret = 0;
 
+       if (muram_pbase)
+               return 0;
+
        spin_lock_init(&cpm_muram_lock);
        /* initialize the info header */
        rh_init(&cpm_muram_info, 1,