All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] plugins/ril.c: avoid create a gril each time enable ril modem
@ 2016-01-12  3:39 caiwen.zhang
  2016-01-12 19:48 ` Tony Espy
  0 siblings, 1 reply; 2+ messages in thread
From: caiwen.zhang @ 2016-01-12  3:39 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 579 bytes --]

From: Caiwen Zhang <caiwen.zhang@intel.com>

---
 plugins/ril.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/plugins/ril.c b/plugins/ril.c
index ea50d76..688a5bf 100644
--- a/plugins/ril.c
+++ b/plugins/ril.c
@@ -400,9 +400,13 @@ static gboolean connect_rild(gpointer user_data)
 int ril_enable(struct ofono_modem *modem)
 {
 	int ret;
+  struct ril_data *rd = ofono_modem_get_data(modem);
 
 	DBG("");
 
+	if (rd->ril)
+		return 0;
+
 	ret = create_gril(modem);
 	if (ret < 0)
 		g_timeout_add_seconds(RILD_CONNECT_RETRY_TIME_S,
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-01-12 19:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-12  3:39 [PATCH] plugins/ril.c: avoid create a gril each time enable ril modem caiwen.zhang
2016-01-12 19:48 ` Tony Espy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.