static int ril_call_volume_probe(struct ofono_call_volume *cv, unsigned int vendor, void *data) { GRil *ril = data; struct cv_data *cvd; cvd = g_new0(struct cv_data, 1); if (cvd == NULL) return -ENOMEM; cvd->ril = g_ril_clone(ril); cvd->vendor = vendor; ofono_call_volume_set_data(cv, cvd); /* * ofono_call_volume_register() needs to be called after * the driver has been set in ofono_call_volume_create(), * which calls this function. Most other drivers make * some kind of capabilities query to the modem, and then * call register in the callback; we use an idle event instead. */ g_idle_add(ril_delayed_register, cv); return 0; }
static void hfp_call_volume_remove(struct ofono_call_volume *cv) { struct cv_data *vd = ofono_call_volume_get_data(cv); ofono_call_volume_set_data(cv, NULL); g_free(vd); }
static void ril_call_volume_remove(struct ofono_call_volume *cv) { struct cv_data *cvd = ofono_call_volume_get_data(cv); ofono_call_volume_set_data(cv, NULL); g_ril_unref(cvd->ril); g_free(cvd); }
static int hfp_call_volume_probe(struct ofono_call_volume *cv, unsigned int vendor, void *data) { struct hfp_data *d = data; struct cv_data *vd; DBG(""); vd = g_new0(struct cv_data, 1); vd->chat = d->chat; ofono_call_volume_set_data(cv, vd); hfp_call_volume_initialized(cv); return 0; }