diff --git a/drivers/dsp/syslink/multicore_ipc/platform_mem.c b/drivers/dsp/syslink/multicore_ipc/platform_mem.c old mode 100755 new mode 100644 index 8fa2160c418b4678949ff9010f3111dfeb08e8d9..db89050cf57c0c911e2cc3f481d4f8c80c23dca6 --- a/drivers/dsp/syslink/multicore_ipc/platform_mem.c +++ b/drivers/dsp/syslink/multicore_ipc/platform_mem.c @@ -117,7 +117,7 @@ int platform_mem_destroy(void) == PLATFORM_MEM_MAKE_MAGICSTAMP(0)) { list_del(&platform_mem_state.map_table); /* Delete the gate handle */ - kfree(&platform_mem_state.gate); + kfree(platform_mem_state.gate); } exit: diff --git a/drivers/dsp/syslink/multicore_ipc/sysmgr.c b/drivers/dsp/syslink/multicore_ipc/sysmgr.c old mode 100755 new mode 100644 index 2902cec9f772d1fe2a8fd5410522b6f407611c15..0aa5d29afbfb3ac524c0c7943bc43b020eee469a --- a/drivers/dsp/syslink/multicore_ipc/sysmgr.c +++ b/drivers/dsp/syslink/multicore_ipc/sysmgr.c @@ -137,6 +137,8 @@ struct sysmgr_module_object { /* Overall system configuration */ struct sysmgr_boot_load_page *boot_load_page[MULTIPROC_MAXPROCESSORS]; /* Boot load page of the slaves */ + bool platform_mem_init_flag; + /* Platform memory manager initialize flag */ bool multiproc_init_flag; /* Multiproc Initialize flag */ bool gatepeterson_init_flag; @@ -373,8 +375,9 @@ s32 sysmgr_setup(const struct sysmgr_config *cfg) printk(KERN_ERR "sysmgr_setup : platform_mem_setup " "failed [0x%x]\n", status); } else { - printk(KERN_ERR "platform_mem_setup_setup : status [0x%x]\n" , + printk(KERN_ERR "platform_mem_setup : status [0x%x]\n" , status); + sysmgr_state.platform_mem_init_flag = true; } /* Override the platform specific configuration */ @@ -733,6 +736,17 @@ s32 sysmgr_destroy(void) } } + /* Finalize PlatformMem module */ + if (sysmgr_state.platform_mem_init_flag == true) { + status = platform_mem_destroy(); + if (status < 0) { + printk(KERN_ERR "sysmgr_destroy : platform_mem_destroy " + "failed [0x%x]\n", status); + } else { + sysmgr_state.platform_mem_init_flag = false; + } + } + atomic_set(&sysmgr_state.ref_count, SYSMGR_MAKE_MAGICSTAMP(0)); exit: