LOGD("Starting %s for device: %s", RIL_VERSION_STRING, ril_device->name);
- rc = ril_device_data_create(ril_device);
+ rc = ril_device_init(ril_device);
if(rc < 0) {
- goto failure;
- }
+ LOGE("Failed to init device!");
+ ril_device_deinit(ril_device);
- rc = ril_device_power_on(ril_device);
- if(rc < 0) {
- goto failure;
+ return NULL;
}
- rc = ril_device_boot(ril_device);
+ rc = ril_device_recv_thread_start(ril_device);
if(rc < 0) {
- goto failure;
- }
+ LOGE("Failed to start device thread!");
+ ril_device_deinit(ril_device);
- rc = ril_device_open(ril_device);
- if(rc < 0) {
- goto failure;
+ return NULL;
}
- LOGD("Init process done");
+ LOGD("Initialization complete");
return &ril_ops;
-
-failure:
- LOGE("Failure, aborting!");
- return NULL;
}