diff options
author | Paul Kocialkowski <contact@paulk.fr> | 2013-03-06 19:45:12 +0100 |
---|---|---|
committer | Paul Kocialkowski <contact@paulk.fr> | 2013-03-06 19:45:12 +0100 |
commit | 0d0f2ab21d3d26bc8a5d04a4b7a717763382e855 (patch) | |
tree | bb682b14cb7bb67f68b20050641626a551d3bc38 | |
parent | 391a6e58e68759d35e27af4703d4a3f274471a7c (diff) | |
download | hardware_ril_samsung-ril-0d0f2ab21d3d26bc8a5d04a4b7a717763382e855.zip hardware_ril_samsung-ril-0d0f2ab21d3d26bc8a5d04a4b7a717763382e855.tar.gz hardware_ril_samsung-ril-0d0f2ab21d3d26bc8a5d04a4b7a717763382e855.tar.bz2 |
pwr: Wait for IPC_PWR_PHONE_PWR_UP to complete startup
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
-rw-r--r-- | pwr.c | 2 | ||||
-rw-r--r-- | samsung-ril.c | 4 | ||||
-rw-r--r-- | samsung-ril.h | 3 |
3 files changed, 8 insertions, 1 deletions
@@ -35,7 +35,7 @@ void ipc_pwr_phone_pwr_up(void) ril_data.state.radio_state = RADIO_STATE_OFF; ril_data.state.power_state = IPC_PWR_PHONE_STATE_LPM; - ril_request_unsolicited(RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED, NULL, 0); + RIL_START_UNLOCK(); } /** diff --git a/samsung-ril.c b/samsung-ril.c index b10a624..f79022a 100644 --- a/samsung-ril.c +++ b/samsung-ril.c @@ -759,5 +759,9 @@ end: RIL_UNLOCK(); + // Wait for power up + RIL_START_LOCK(); + RIL_START_LOCK(); + return &ril_ops; } diff --git a/samsung-ril.h b/samsung-ril.h index 796c0ad..25f7539 100644 --- a/samsung-ril.h +++ b/samsung-ril.h @@ -52,6 +52,8 @@ #define RIL_LOCK() pthread_mutex_lock(&ril_data.mutex) #define RIL_UNLOCK() pthread_mutex_unlock(&ril_data.mutex) +#define RIL_START_LOCK() pthread_mutex_lock(&ril_data.start_mutex) +#define RIL_START_UNLOCK() pthread_mutex_unlock(&ril_data.start_mutex) #define RIL_CLIENT_LOCK(client) pthread_mutex_lock(&(client->mutex)) #define RIL_CLIENT_UNLOCK(client) pthread_mutex_unlock(&(client->mutex)) @@ -200,6 +202,7 @@ struct ril_data { struct ril_client *srs_client; pthread_mutex_t mutex; + pthread_mutex_t start_mutex; }; extern struct ril_data ril_data; |