summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDara Spieker-Doyle <dara.spieker-doyle@nokia.com>2011-01-14 12:25:52 -0800
committerDenis Kenzior <denkenz@gmail.com>2011-01-14 14:18:51 -0600
commite4143d651c88f9c20aea8da73c4017b17b411103 (patch)
tree13c116783f909d16547aa1b96416b37d7f5f68ab
parenta0e3d9ffc386a4b4ea50d724e98fbb17c34917af (diff)
downloadofono-e4143d651c88f9c20aea8da73c4017b17b411103.tar.bz2
cdmamodem: fix to follow oFono probe rules
Not allowed to call register directly from probe, use g_idle_add instead for now
-rw-r--r--drivers/cdmamodem/voicecall.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/cdmamodem/voicecall.c b/drivers/cdmamodem/voicecall.c
index a0fa79fe..94ec74b6 100644
--- a/drivers/cdmamodem/voicecall.c
+++ b/drivers/cdmamodem/voicecall.c
@@ -109,6 +109,15 @@ static void cdma_hangup(struct ofono_cdma_voicecall *vc,
cdma_template("AT+CHV", vc, cdma_hangup_cb, cb, data);
}
+static gboolean cdma_voicecall_initialized(gpointer user_data)
+{
+ struct ofono_cdma_voicecall *vc = user_data;
+
+ ofono_cdma_voicecall_register(vc);
+
+ return FALSE;
+}
+
static int cdma_voicecall_probe(struct ofono_cdma_voicecall *vc,
unsigned int vendor, void *data)
{
@@ -123,8 +132,7 @@ static int cdma_voicecall_probe(struct ofono_cdma_voicecall *vc,
vd->vendor = vendor;
ofono_cdma_voicecall_set_data(vc, vd);
-
- ofono_cdma_voicecall_register(vc);
+ g_idle_add(cdma_voicecall_initialized, vc);
return 0;
}