Commit 4931ee07 authored by Simon Que's avatar Simon Que Committed by Hari Kanigeri

Subject: SYSLINK fixes for shutdown stage

This patch fixes the setup/destroy of several modules to make
the cleanup stage run to completion.
Signed-off-by: default avatarSimon Que <sque@ti.com>
parent c718d6b6
......@@ -445,7 +445,7 @@ int messageq_destroy(void)
if (!(atomic_dec_return(&messageq_state.ref_count)
== MESSAGEQ_MAKE_MAGICSTAMP(0))) {
status = -EBUSY;
status = 1;
goto exit;
}
......
......@@ -285,6 +285,12 @@ int nameserver_destroy(void)
goto exit;
}
if (!(atomic_dec_return(&nameserver_state.ref_count)
== NAMESERVER_MAKE_MAGICSTAMP(0))) {
retval = 1;
goto exit;
}
if (WARN_ON(nameserver_state.list_lock == NULL)) {
retval = -ENODEV;
goto exit;
......@@ -296,12 +302,6 @@ int nameserver_destroy(void)
goto exit;
}
if (!(atomic_dec_return(&nameserver_state.ref_count)
== NAMESERVER_MAKE_MAGICSTAMP(0))) {
retval = -EBUSY;
goto exit;
}
retval = mutex_lock_interruptible(nameserver_state.list_lock);
if (retval)
goto exit;
......
......@@ -185,7 +185,7 @@ int sharedregion_destroy(void)
if (!(atomic_dec_return(&sharedregion_state.ref_count)
== SHAREDREGION_MAKE_MAGICSTAMP(0))) {
retval = -EBUSY; /* Syslink is not handling this on 2.0.0.06 */
retval = 1; /* Syslink is not handling this on 2.0.0.06 */
goto error;
}
......
......@@ -578,8 +578,11 @@ s32 sysmgr_destroy(void)
}
if (atomic_dec_return(&sysmgr_state.ref_count)
== SYSMGR_MAKE_MAGICSTAMP(0))
!= SYSMGR_MAKE_MAGICSTAMP(0))
{
status = 1;
goto exit;
}
/* Finalize Platform module*/
if (sysmgr_state.platform_init_flag == true) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment