st-hal: Prevent double second stage prepare/stop

Second stage prepare/stop functions should only be called as
part of the client load/unload sequences. Currently, they are
also erroneously called internally within the SSR state function.
So if client load or unload occurs during SSR, these functions can
be called twice, which causes failures.

Change-Id: I22c1878db37dfebf5464020bc07651bf0b239600
diff --git a/st_session.c b/st_session.c
index 0ccdeaf..2ae2d81 100644
--- a/st_session.c
+++ b/st_session.c
@@ -2784,7 +2784,7 @@
     return 0;
 }
 
-static inline int prepapre_second_stage_for_client(st_session_t *stc_ses)
+static inline int prepare_second_stage_for_client(st_session_t *stc_ses)
 {
     struct listnode *node = NULL;
     st_arm_second_stage_t *st_sec_stage = NULL;
@@ -5467,7 +5467,6 @@
                 status = -EINVAL;
                 break;
             }
-            prepapre_second_stage_for_client(stc_ses);
             stc_ses->state = ST_STATE_LOADED;
         } else {
             ALOGE("%s: received unexpected event, client state = %d",
@@ -5481,7 +5480,6 @@
             if (status)
                 ALOGE("%s:[c%d] update sound_model failed %d", __func__,
                     stc_ses->sm_handle, status);
-            stop_second_stage_for_client(stc_ses);
             stc_ses->state = ST_STATE_IDLE;
         } else {
             ALOGE("%s: received unexpected event, client state = %d",
@@ -5574,7 +5572,7 @@
     pthread_mutex_lock(&st_ses->lock);
     DISPATCH_EVENT(st_ses, ev, status);
     if (!status) {
-        prepapre_second_stage_for_client(stc_ses);
+        prepare_second_stage_for_client(stc_ses);
         stc_ses->state = ST_STATE_LOADED;
     }
     pthread_mutex_unlock(&st_ses->lock);