/* sets initial device mode and notifies client hotplugs that device is ready */
int smscore_start_device(struct smscore_device_t *coredev)
/* sets initial device mode and notifies client hotplugs that device is ready */
int smscore_start_device(struct smscore_device_t *coredev)
{
	int rc = smscore_set_device_mode(
			coredev, smscore_registry_getmode(coredev->devpath));
	if (rc < 0) {
		sms_info("set device mode faile , rc %d", rc);
		return rc;
	}
	kmutex_lock(&g_smscore_deviceslock);
	rc = smscore_notify_callbacks(coredev, coredev->device, 1);
	smscore_init_ir(coredev);
	sms_info("device %p started, rc %d", coredev, rc);
	kmutex_unlock(&g_smscore_deviceslock);
	return rc;
}