Example #1
0
int ril_gprs_probe(struct ofono_gprs *gprs, unsigned int vendor, void *data)
{
	struct ril_gprs_driver_data *driver_data = data;
	struct ril_gprs_data *gd;

	gd = g_try_new0(struct ril_gprs_data, 1);
	if (gd == NULL)
		return -ENOMEM;

	ril_gprs_start(driver_data, gprs, gd);

	return 0;
}
Example #2
0
File: gprs.c Project: morphis/ofono
static int mtk_gprs_probe(struct ofono_gprs *gprs,
				unsigned int vendor, void *data)
{
	struct ril_gprs_driver_data *driver_data = data;
	struct ril_gprs_data *gd;

	gd = g_try_new0(struct ril_gprs_data, 1);
	if (gd == NULL)
		return -ENOMEM;

	ril_gprs_start(driver_data, gprs, gd);

	/*
	 * In MTK the event emitted when the gprs state changes is different
	 * from the one in AOSP ril. Overwrite the one set in parent.
	 */
	gd->state_changed_unsol =
				MTK_RIL_UNSOL_RESPONSE_PS_NETWORK_STATE_CHANGED;

	g_ril_register(gd->ril, MTK_RIL_UNSOL_GPRS_DETACH, detach_event, gprs);

	return 0;
}