diff options
author | Denis Kenzior <denkenz@gmail.com> | 2009-08-19 18:15:46 -0500 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2009-08-19 18:35:08 -0500 |
commit | 8c92e3dd188279866ba7bf8bf56eca7ee8b1a909 (patch) | |
tree | 810440499ef040fcc8e3b6825e07139fb60f1dc8 | |
parent | e8e6d519fe5ca077346cafd6e342a8f0a6c3f0f9 (diff) | |
download | ofono-8c92e3dd188279866ba7bf8bf56eca7ee8b1a909.tar.bz2 |
Remove modem member from cb_data
-rw-r--r-- | drivers/atmodem/at.h | 5 | ||||
-rw-r--r-- | drivers/atmodem/call-barring.c | 6 | ||||
-rw-r--r-- | drivers/atmodem/call-forwarding.c | 4 | ||||
-rw-r--r-- | drivers/atmodem/call-meter.c | 14 | ||||
-rw-r--r-- | drivers/atmodem/call-settings.c | 12 | ||||
-rw-r--r-- | drivers/atmodem/network-registration.c | 14 | ||||
-rw-r--r-- | drivers/atmodem/phonebook.c | 2 | ||||
-rw-r--r-- | drivers/atmodem/sim.c | 14 | ||||
-rw-r--r-- | drivers/atmodem/sms.c | 6 | ||||
-rw-r--r-- | drivers/atmodem/ussd.c | 4 | ||||
-rw-r--r-- | drivers/atmodem/voicecall.c | 6 |
11 files changed, 42 insertions, 45 deletions
diff --git a/drivers/atmodem/at.h b/drivers/atmodem/at.h index d97b3ee0..8ec80460 100644 --- a/drivers/atmodem/at.h +++ b/drivers/atmodem/at.h @@ -32,12 +32,10 @@ void dump_response(const char *func, gboolean ok, GAtResult *result); struct cb_data { void *cb; void *data; - struct ofono_modem *modem; void *user; }; -static inline struct cb_data *cb_data_new(struct ofono_modem *modem, - void *cb, void *data) +static inline struct cb_data *cb_data_new(void *cb, void *data) { struct cb_data *ret; @@ -48,7 +46,6 @@ static inline struct cb_data *cb_data_new(struct ofono_modem *modem, ret->cb = cb; ret->data = data; - ret->modem = modem; return ret; } diff --git a/drivers/atmodem/call-barring.c b/drivers/atmodem/call-barring.c index fe3f48ab..f2ac438d 100644 --- a/drivers/atmodem/call-barring.c +++ b/drivers/atmodem/call-barring.c @@ -84,7 +84,7 @@ static void at_call_barring_query(struct ofono_call_barring *cb, void *data) { GAtChat *chat = ofono_call_barring_get_data(cb); - struct cb_data *cbd = cb_data_new(NULL, callback, data); + struct cb_data *cbd = cb_data_new(callback, data); char buf[64]; int len; @@ -124,7 +124,7 @@ static void at_call_barring_set(struct ofono_call_barring *cb, const char *lock, void *data) { GAtChat *chat = ofono_call_barring_get_data(cb); - struct cb_data *cbd = cb_data_new(NULL, callback, data); + struct cb_data *cbd = cb_data_new(callback, data); char buf[64]; int len; @@ -174,7 +174,7 @@ static void at_call_barring_set_passwd(struct ofono_call_barring *cb, void *data) { GAtChat *chat = ofono_call_barring_get_data(cb); - struct cb_data *cbd = cb_data_new(NULL, callback, data); + struct cb_data *cbd = cb_data_new(callback, data); char buf[64]; if (!cbd || strlen(lock) != 2) diff --git a/drivers/atmodem/call-forwarding.c b/drivers/atmodem/call-forwarding.c index 53301147..d6224680 100644 --- a/drivers/atmodem/call-forwarding.c +++ b/drivers/atmodem/call-forwarding.c @@ -126,7 +126,7 @@ static void at_ccfc_query(struct ofono_call_forwarding *cf, int type, int cls, ofono_call_forwarding_query_cb_t cb, void *data) { GAtChat *chat = ofono_call_forwarding_get_data(cf); - struct cb_data *cbd = cb_data_new(NULL, cb, data); + struct cb_data *cbd = cb_data_new(cb, data); char buf[64]; if (!cbd) @@ -169,7 +169,7 @@ static void at_ccfc_set(struct ofono_call_forwarding *cf, const char *buf, ofono_call_forwarding_set_cb_t cb, void *data) { GAtChat *chat = ofono_call_forwarding_get_data(cf); - struct cb_data *cbd = cb_data_new(NULL, cb, data); + struct cb_data *cbd = cb_data_new(cb, data); if (!cbd) goto error; diff --git a/drivers/atmodem/call-meter.c b/drivers/atmodem/call-meter.c index 35ef087d..15c270fc 100644 --- a/drivers/atmodem/call-meter.c +++ b/drivers/atmodem/call-meter.c @@ -115,7 +115,7 @@ static void at_caoc_query(struct ofono_call_meter *cm, void *data) { GAtChat *chat = ofono_call_meter_get_data(cm); - struct cb_data *cbd = cb_data_new(NULL, cb, data); + struct cb_data *cbd = cb_data_new(cb, data); if (!cbd) goto error; @@ -140,7 +140,7 @@ static void at_cacm_query(struct ofono_call_meter *cm, void *data) { GAtChat *chat = ofono_call_meter_get_data(cm); - struct cb_data *cbd = cb_data_new(NULL, cb, data); + struct cb_data *cbd = cb_data_new(cb, data); if (!cbd) goto error; @@ -176,7 +176,7 @@ static void at_cacm_set(struct ofono_call_meter *cm, const char *passwd, ofono_call_meter_set_cb_t cb, void *data) { GAtChat *chat = ofono_call_meter_get_data(cm); - struct cb_data *cbd = cb_data_new(NULL, cb, data); + struct cb_data *cbd = cb_data_new(cb, data); char buf[64]; if (!cbd) @@ -203,7 +203,7 @@ static void at_camm_query(struct ofono_call_meter *cm, void *data) { GAtChat *chat = ofono_call_meter_get_data(cm); - struct cb_data *cbd = cb_data_new(NULL, cb, data); + struct cb_data *cbd = cb_data_new(cb, data); if (!cbd) goto error; @@ -228,7 +228,7 @@ static void at_camm_set(struct ofono_call_meter *cm, ofono_call_meter_set_cb_t cb, void *data) { GAtChat *chat = ofono_call_meter_get_data(cm); - struct cb_data *cbd = cb_data_new(NULL, cb, data); + struct cb_data *cbd = cb_data_new(cb, data); char buf[64]; if (!cbd) @@ -291,7 +291,7 @@ static void at_cpuc_query(struct ofono_call_meter *cm, ofono_call_meter_puct_query_cb_t cb, void *data) { GAtChat *chat = ofono_call_meter_get_data(cm); - struct cb_data *cbd = cb_data_new(NULL, cb, data); + struct cb_data *cbd = cb_data_new(cb, data); if (!cbd) goto error; @@ -316,7 +316,7 @@ static void at_cpuc_set(struct ofono_call_meter *cm, const char *currency, ofono_call_meter_set_cb_t cb, void *data) { GAtChat *chat = ofono_call_meter_get_data(cm); - struct cb_data *cbd = cb_data_new(NULL, cb, data); + struct cb_data *cbd = cb_data_new(cb, data); char buf[64]; if (!cbd) diff --git a/drivers/atmodem/call-settings.c b/drivers/atmodem/call-settings.c index 8ca6c3c4..8c0f1dff 100644 --- a/drivers/atmodem/call-settings.c +++ b/drivers/atmodem/call-settings.c @@ -81,7 +81,7 @@ static void at_ccwa_query(struct ofono_call_settings *cs, int cls, ofono_call_settings_status_cb_t cb, void *data) { GAtChat *chat = ofono_call_settings_get_data(cs); - struct cb_data *cbd = cb_data_new(NULL, cb, data); + struct cb_data *cbd = cb_data_new(cb, data); char buf[64]; if (!cbd) @@ -124,7 +124,7 @@ static void at_ccwa_set(struct ofono_call_settings *cs, int mode, int cls, ofono_call_settings_set_cb_t cb, void *data) { GAtChat *chat = ofono_call_settings_get_data(cs); - struct cb_data *cbd = cb_data_new(NULL, cb, data); + struct cb_data *cbd = cb_data_new(cb, data); char buf[64]; if (!cbd) @@ -185,7 +185,7 @@ static void at_clip_query(struct ofono_call_settings *cs, ofono_call_settings_status_cb_t cb, void *data) { GAtChat *chat = ofono_call_settings_get_data(cs); - struct cb_data *cbd = cb_data_new(NULL, cb, data); + struct cb_data *cbd = cb_data_new(cb, data); if (!cbd) goto error; @@ -242,7 +242,7 @@ static void at_colp_query(struct ofono_call_settings *cs, ofono_call_settings_status_cb_t cb, void *data) { GAtChat *chat = ofono_call_settings_get_data(cs); - struct cb_data *cbd = cb_data_new(NULL, cb, data); + struct cb_data *cbd = cb_data_new(cb, data); if (!cbd) goto error; @@ -299,7 +299,7 @@ static void at_clir_query(struct ofono_call_settings *cs, ofono_call_settings_clir_cb_t cb, void *data) { GAtChat *chat = ofono_call_settings_get_data(cs); - struct cb_data *cbd = cb_data_new(NULL, cb, data); + struct cb_data *cbd = cb_data_new(cb, data); if (!cbd) goto error; @@ -334,7 +334,7 @@ static void at_clir_set(struct ofono_call_settings *cs, int mode, ofono_call_settings_set_cb_t cb, void *data) { GAtChat *chat = ofono_call_settings_get_data(cs); - struct cb_data *cbd = cb_data_new(NULL, cb, data); + struct cb_data *cbd = cb_data_new(cb, data); char buf[64]; if (!cbd) diff --git a/drivers/atmodem/network-registration.c b/drivers/atmodem/network-registration.c index 8e7bac8d..10025193 100644 --- a/drivers/atmodem/network-registration.c +++ b/drivers/atmodem/network-registration.c @@ -116,7 +116,7 @@ static void at_registration_status(struct ofono_netreg *netreg, void *data) { struct netreg_data *nd = ofono_netreg_get_data(netreg); - struct cb_data *cbd = cb_data_new(NULL, cb, data); + struct cb_data *cbd = cb_data_new(cb, data); if (!cbd) goto error; @@ -248,7 +248,7 @@ static void at_current_operator(struct ofono_netreg *netreg, ofono_netreg_operator_cb_t cb, void *data) { struct netreg_data *nd = ofono_netreg_get_data(netreg); - struct cb_data *cbd = cb_data_new(NULL, cb, data); + struct cb_data *cbd = cb_data_new(cb, data); gboolean ok; if (!cbd) @@ -391,7 +391,7 @@ static void at_list_operators(struct ofono_netreg *netreg, ofono_netreg_operator_list_cb_t cb, void *data) { struct netreg_data *nd = ofono_netreg_get_data(netreg); - struct cb_data *cbd = cb_data_new(NULL, cb, data); + struct cb_data *cbd = cb_data_new(cb, data); if (!cbd) goto error; @@ -426,7 +426,7 @@ static void at_register_auto(struct ofono_netreg *netreg, ofono_netreg_register_cb_t cb, void *data) { struct netreg_data *nd = ofono_netreg_get_data(netreg); - struct cb_data *cbd = cb_data_new(NULL, cb, data); + struct cb_data *cbd = cb_data_new(cb, data); if (!cbd) goto error; @@ -450,7 +450,7 @@ static void at_register_manual(struct ofono_netreg *netreg, ofono_netreg_register_cb_t cb, void *data) { struct netreg_data *nd = ofono_netreg_get_data(netreg); - struct cb_data *cbd = cb_data_new(NULL, cb, data); + struct cb_data *cbd = cb_data_new(cb, data); char buf[128]; if (!cbd) @@ -476,7 +476,7 @@ static void at_deregister(struct ofono_netreg *netreg, ofono_netreg_register_cb_t cb, void *data) { struct netreg_data *nd = ofono_netreg_get_data(netreg); - struct cb_data *cbd = cb_data_new(NULL, cb, data); + struct cb_data *cbd = cb_data_new(cb, data); if (!cbd) goto error; @@ -562,7 +562,7 @@ static void at_signal_strength(struct ofono_netreg *netreg, ofono_netreg_strength_cb_t cb, void *data) { struct netreg_data *nd = ofono_netreg_get_data(netreg); - struct cb_data *cbd = cb_data_new(NULL, cb, data); + struct cb_data *cbd = cb_data_new(cb, data); if (!cbd) goto error; diff --git a/drivers/atmodem/phonebook.c b/drivers/atmodem/phonebook.c index 2bba6687..ae7f59f9 100644 --- a/drivers/atmodem/phonebook.c +++ b/drivers/atmodem/phonebook.c @@ -374,7 +374,7 @@ static void at_export_entries(struct ofono_phonebook *pb, const char *storage, ofono_phonebook_cb_t cb, void *data) { struct pb_data *pbd = ofono_phonebook_get_data(pb); - struct cb_data *cbd = cb_data_new(NULL, cb, data); + struct cb_data *cbd = cb_data_new(cb, data); char buf[32]; if (!cbd) diff --git a/drivers/atmodem/sim.c b/drivers/atmodem/sim.c index 84f8548e..7215152f 100644 --- a/drivers/atmodem/sim.c +++ b/drivers/atmodem/sim.c @@ -106,7 +106,7 @@ static void at_sim_read_info(struct ofono_sim *sim, int fileid, void *data) { GAtChat *chat = ofono_sim_get_data(sim); - struct cb_data *cbd = cb_data_new(NULL, cb, data); + struct cb_data *cbd = cb_data_new(cb, data); char buf[64]; if (!cbd) @@ -177,7 +177,7 @@ static void at_sim_read_binary(struct ofono_sim *sim, int fileid, ofono_sim_read_cb_t cb, void *data) { GAtChat *chat = ofono_sim_get_data(sim); - struct cb_data *cbd = cb_data_new(NULL, cb, data); + struct cb_data *cbd = cb_data_new(cb, data); char buf[64]; if (!cbd) @@ -205,7 +205,7 @@ static void at_sim_read_record(struct ofono_sim *sim, int fileid, ofono_sim_read_cb_t cb, void *data) { GAtChat *chat = ofono_sim_get_data(sim); - struct cb_data *cbd = cb_data_new(NULL, cb, data); + struct cb_data *cbd = cb_data_new(cb, data); char buf[64]; if (!cbd) @@ -276,7 +276,7 @@ static void at_sim_update_binary(struct ofono_sim *sim, int fileid, ofono_sim_write_cb_t cb, void *data) { GAtChat *chat = ofono_sim_get_data(sim); - struct cb_data *cbd = cb_data_new(NULL, cb, data); + struct cb_data *cbd = cb_data_new(cb, data); char *buf = g_try_new(char, 36 + length * 2); int len, ret; @@ -313,7 +313,7 @@ static void at_sim_update_record(struct ofono_sim *sim, int fileid, ofono_sim_write_cb_t cb, void *data) { GAtChat *chat = ofono_sim_get_data(sim); - struct cb_data *cbd = cb_data_new(NULL, cb, data); + struct cb_data *cbd = cb_data_new(cb, data); char *buf = g_try_new(char, 36 + length * 2); int len, ret; @@ -349,7 +349,7 @@ static void at_sim_update_cyclic(struct ofono_sim *sim, int fileid, ofono_sim_write_cb_t cb, void *data) { GAtChat *chat = ofono_sim_get_data(sim); - struct cb_data *cbd = cb_data_new(NULL, cb, data); + struct cb_data *cbd = cb_data_new(cb, data); char *buf = g_try_new(char, 36 + length * 2); int len, ret; @@ -412,7 +412,7 @@ static void at_read_imsi(struct ofono_sim *sim, ofono_sim_imsi_cb_t cb, void *data) { GAtChat *chat = ofono_sim_get_data(sim); - struct cb_data *cbd = cb_data_new(NULL, cb, data); + struct cb_data *cbd = cb_data_new(cb, data); if (!cbd) goto error; diff --git a/drivers/atmodem/sms.c b/drivers/atmodem/sms.c index ed85a3a5..2f9776c9 100644 --- a/drivers/atmodem/sms.c +++ b/drivers/atmodem/sms.c @@ -98,7 +98,7 @@ static void at_csca_set(struct ofono_sms *sms, ofono_sms_sca_set_cb_t cb, void *user_data) { struct sms_data *data = ofono_sms_get_data(sms); - struct cb_data *cbd = cb_data_new(NULL, cb, user_data); + struct cb_data *cbd = cb_data_new(cb, user_data); char buf[64]; if (!cbd) @@ -173,7 +173,7 @@ static void at_csca_query(struct ofono_sms *sms, ofono_sms_sca_query_cb_t cb, void *user_data) { struct sms_data *data = ofono_sms_get_data(sms); - struct cb_data *cbd = cb_data_new(NULL, cb, user_data); + struct cb_data *cbd = cb_data_new(cb, user_data); if (!cbd) goto error; @@ -233,7 +233,7 @@ static void at_cmgs(struct ofono_sms *sms, unsigned char *pdu, int pdu_len, void *user_data) { struct sms_data *data = ofono_sms_get_data(sms); - struct cb_data *cbd = cb_data_new(NULL, cb, user_data); + struct cb_data *cbd = cb_data_new(cb, user_data); char buf[512]; int len; diff --git a/drivers/atmodem/ussd.c b/drivers/atmodem/ussd.c index c3793229..49801f7c 100644 --- a/drivers/atmodem/ussd.c +++ b/drivers/atmodem/ussd.c @@ -58,7 +58,7 @@ static void at_ussd_request(struct ofono_ussd *ussd, const char *str, ofono_ussd_cb_t cb, void *data) { GAtChat *chat = ofono_ussd_get_data(ussd); - struct cb_data *cbd = cb_data_new(NULL, cb, data); + struct cb_data *cbd = cb_data_new(cb, data); unsigned char *converted; int dcs; int max_len; @@ -115,7 +115,7 @@ static void at_ussd_cancel(struct ofono_ussd *ussd, ofono_ussd_cb_t cb, void *data) { GAtChat *chat = ofono_ussd_get_data(ussd); - struct cb_data *cbd = cb_data_new(NULL, cb, data); + struct cb_data *cbd = cb_data_new(cb, data); if (!cbd) goto error; diff --git a/drivers/atmodem/voicecall.c b/drivers/atmodem/voicecall.c index c66872a4..1a2ef00c 100644 --- a/drivers/atmodem/voicecall.c +++ b/drivers/atmodem/voicecall.c @@ -425,7 +425,7 @@ static void at_dial(struct ofono_voicecall *vc, ofono_voicecall_cb_t cb, void *data) { struct voicecall_data *vd = ofono_voicecall_get_data(vc); - struct cb_data *cbd = cb_data_new(NULL, cb, data); + struct cb_data *cbd = cb_data_new(cb, data); char buf[256]; if (!cbd) @@ -565,7 +565,7 @@ static void at_list_calls(struct ofono_voicecall *vc, ofono_call_list_cb_t cb, void *data) { struct voicecall_data *vd = ofono_voicecall_get_data(vc); - struct cb_data *cbd = cb_data_new(NULL, cb, data); + struct cb_data *cbd = cb_data_new(cb, data); if (!cbd) goto error; @@ -699,7 +699,7 @@ static void at_send_dtmf(struct ofono_voicecall *vc, const char *dtmf, ofono_voicecall_cb_t cb, void *data) { struct voicecall_data *vd = ofono_voicecall_get_data(vc); - struct cb_data *cbd = cb_data_new(NULL, cb, data); + struct cb_data *cbd = cb_data_new(cb, data); int len = strlen(dtmf); int s; int i; |