summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Kenzior <denis.kenzior@intel.com>2009-09-01 17:53:31 -0500
committerDenis Kenzior <denkenz@gmail.com>2009-09-01 18:14:58 -0500
commitafb0e2b854848d1fbedeae9973541ee2cc0d2a9f (patch)
tree8153f944719742790098a3b658f9d07f0a72fe53
parent8d380f8fa0b41749868fc0fed7c8523f60c047c6 (diff)
Add vendor flag capability to ssn
-rw-r--r--drivers/atmodem/ssn.c5
-rw-r--r--drivers/isimodem/isimodem.c2
-rw-r--r--drivers/isimodem/ssn.c4
-rw-r--r--include/ssn.h4
-rw-r--r--plugins/generic_at.c2
-rw-r--r--src/ssn.c4
6 files changed, 12 insertions, 9 deletions
diff --git a/drivers/atmodem/ssn.c b/drivers/atmodem/ssn.c
index c8f23b69..7c7e86ea 100644
--- a/drivers/atmodem/ssn.c
+++ b/drivers/atmodem/ssn.c
@@ -111,8 +111,11 @@ static gboolean at_ssn_register(gpointer user)
return FALSE;
}
-static int at_ssn_probe(struct ofono_ssn *ssn)
+static int at_ssn_probe(struct ofono_ssn *ssn, int vendor, void *data)
{
+ GAtChat *chat = data;
+
+ ofono_ssn_set_data(ssn, chat);
g_idle_add(at_ssn_register, ssn);
return 0;
diff --git a/drivers/isimodem/isimodem.c b/drivers/isimodem/isimodem.c
index dc641dd3..77c1a890 100644
--- a/drivers/isimodem/isimodem.c
+++ b/drivers/isimodem/isimodem.c
@@ -155,7 +155,7 @@ static int isi_modem_populate(struct ofono_modem *modem)
ofono_voicecall_create(isi->modem, "isi", isi->idx);
ofono_sms_create(isi->modem, 0, "isi", isi->idx);
ofono_sim_create(isi->modem, 0, "isi", isi->idx);
- ofono_ssn_create(isi->modem, "isi", isi->idx);
+ ofono_ssn_create(isi->modem, 0, "isi", isi->idx);
ofono_ussd_create(isi->modem, "isi", isi->idx);
ofono_call_forwarding_create(isi->modem, 0, "isi", isi->idx);
ofono_call_settings_create(isi->modem, 0, "isi", isi->idx);
diff --git a/drivers/isimodem/ssn.c b/drivers/isimodem/ssn.c
index 4225ffc2..a5539fbe 100644
--- a/drivers/isimodem/ssn.c
+++ b/drivers/isimodem/ssn.c
@@ -48,9 +48,9 @@ struct ssn_data {
struct isi_version version;
};
-static int isi_ssn_probe(struct ofono_ssn *ssn)
+static int isi_ssn_probe(struct ofono_ssn *ssn, int vendor, void *user)
{
- GIsiModem *idx = ofono_ssn_get_data(ssn);
+ GIsiModem *idx = user;
struct ssn_data *data = g_try_new0(struct ssn_data, 1);
if (!data)
diff --git a/include/ssn.h b/include/ssn.h
index e808bec3..b1e51bfe 100644
--- a/include/ssn.h
+++ b/include/ssn.h
@@ -32,7 +32,7 @@ struct ofono_ssn;
struct ofono_ssn_driver {
const char *name;
- int (*probe)(struct ofono_ssn *ssn);
+ int (*probe)(struct ofono_ssn *ssn, int vendor, void *data);
int (*remove)(struct ofono_ssn *ssn);
};
@@ -44,7 +44,7 @@ void ofono_ssn_cssu_notify(struct ofono_ssn *ssn, int code, int index,
int ofono_ssn_driver_register(const struct ofono_ssn_driver *d);
void ofono_ssn_driver_unregister(const struct ofono_ssn_driver *d);
-struct ofono_ssn *ofono_ssn_create(struct ofono_modem *modem,
+struct ofono_ssn *ofono_ssn_create(struct ofono_modem *modem, int vendor,
const char *driver, void *data);
void ofono_ssn_register(struct ofono_ssn *ssn);
diff --git a/plugins/generic_at.c b/plugins/generic_at.c
index 0900e3ce..1ac35ffb 100644
--- a/plugins/generic_at.c
+++ b/plugins/generic_at.c
@@ -518,7 +518,7 @@ static int generic_at_populate(struct ofono_modem *modem)
ofono_voicecall_create(modem, "generic_at", chat);
ofono_call_meter_create(modem, 0, "generic_at", chat);
ofono_call_barring_create(modem, 0, "generic_at", chat);
- ofono_ssn_create(modem, "generic_at", chat);
+ ofono_ssn_create(modem, 0, "generic_at", chat);
ofono_sms_create(modem, 0, "generic_at", chat);
ofono_phonebook_create(modem, 0, "generic_at", chat);
diff --git a/src/ssn.c b/src/ssn.c
index dc5b3750..11237e39 100644
--- a/src/ssn.c
+++ b/src/ssn.c
@@ -248,6 +248,7 @@ static void ssn_remove(struct ofono_atom *atom)
}
struct ofono_ssn *ofono_ssn_create(struct ofono_modem *modem,
+ int vendor,
const char *driver,
void *data)
{
@@ -262,7 +263,6 @@ struct ofono_ssn *ofono_ssn_create(struct ofono_modem *modem,
if (ssn == NULL)
return NULL;
- ssn->driver_data = data;
ssn->atom = __ofono_modem_add_atom(modem, OFONO_ATOM_TYPE_SSN,
ssn_remove, ssn);
@@ -272,7 +272,7 @@ struct ofono_ssn *ofono_ssn_create(struct ofono_modem *modem,
if (g_strcmp0(drv->name, driver))
continue;
- if (drv->probe(ssn) < 0)
+ if (drv->probe(ssn, vendor, data) < 0)
continue;
ssn->driver = drv;