summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pwr.c2
-rw-r--r--samsung-ril.c4
-rw-r--r--samsung-ril.h3
3 files changed, 8 insertions, 1 deletions
diff --git a/pwr.c b/pwr.c
index e4cf5a7..766390e 100644
--- a/pwr.c
+++ b/pwr.c
@@ -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;