diff options
-rw-r--r-- | drivers/atmodem/ssn.c | 5 | ||||
-rw-r--r-- | drivers/isimodem/isimodem.c | 2 | ||||
-rw-r--r-- | drivers/isimodem/ssn.c | 4 | ||||
-rw-r--r-- | include/ssn.h | 4 | ||||
-rw-r--r-- | plugins/generic_at.c | 2 | ||||
-rw-r--r-- | src/ssn.c | 4 |
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); @@ -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; |