Loading drivers/soc/qcom/service-notifier.c +11 −4 Original line number Diff line number Diff line Loading @@ -98,6 +98,7 @@ struct ind_req_resp { */ struct qmi_client_info { int instance_id; char service_path[SERVREG_NOTIF_NAME_LENGTH]; enum pd_subsys_state subsys_state; struct work_struct ind_ack; struct work_struct new_server; Loading Loading @@ -343,7 +344,8 @@ static void new_server_work(struct work_struct *work) mutex_lock(¬if_add_lock); mutex_lock(&service_list_lock); list_for_each_entry(service_notif, &service_list, list) { if (service_notif->instance_id == data->instance_id) { if (service_notif->instance_id == data->instance_id && !strcmp (service_notif->service_path, data->service_path)) { enum pd_subsys_state state = ROOT_PD_UP; rc = register_notif_listener(service_notif, data, Loading Loading @@ -378,7 +380,8 @@ static void root_service_service_exit(struct qmi_client_info *data, mutex_lock(¬if_add_lock); mutex_lock(&service_list_lock); list_for_each_entry(service_notif, &service_list, list) { if (service_notif->instance_id == data->instance_id) { if (service_notif->instance_id == data->instance_id && !strcmp (data->service_path, service_notif->service_path)) { rc = service_notif_queue_notification(service_notif, SERVREG_NOTIF_SERVICE_STATE_DOWN_V01, &state); Loading Loading @@ -477,7 +480,8 @@ static void *add_service_notif(const char *service_path, int instance_id, */ mutex_lock(&qmi_list_lock); list_for_each_entry(tmp, &qmi_client_list, list) { if (tmp->instance_id == instance_id) { if (tmp->instance_id == instance_id && !strcmp (tmp->service_path, service_path)) { if (tmp->service_connected) { rc = register_notif_listener(service_notif, tmp, curr_state); Loading @@ -503,6 +507,8 @@ static void *add_service_notif(const char *service_path, int instance_id, } qmi_data->instance_id = instance_id; strlcpy(qmi_data->service_path, service_path, ARRAY_SIZE(service_notif->service_path)); qmi_data->svc_event_wq = create_singlethread_workqueue(subsys); if (!qmi_data->svc_event_wq) { rc = -ENOMEM; Loading Loading @@ -633,7 +639,8 @@ int service_notif_pd_restart(const char *service_path, int instance_id) int rc = 0; list_for_each_entry(tmp, &qmi_client_list, list) { if (tmp->instance_id == instance_id) { if (tmp->instance_id == instance_id && !strcmp (tmp->service_path, service_path)) { if (tmp->service_connected) { pr_info("Restarting service %s, instance-id %d\n", service_path, instance_id); Loading Loading
drivers/soc/qcom/service-notifier.c +11 −4 Original line number Diff line number Diff line Loading @@ -98,6 +98,7 @@ struct ind_req_resp { */ struct qmi_client_info { int instance_id; char service_path[SERVREG_NOTIF_NAME_LENGTH]; enum pd_subsys_state subsys_state; struct work_struct ind_ack; struct work_struct new_server; Loading Loading @@ -343,7 +344,8 @@ static void new_server_work(struct work_struct *work) mutex_lock(¬if_add_lock); mutex_lock(&service_list_lock); list_for_each_entry(service_notif, &service_list, list) { if (service_notif->instance_id == data->instance_id) { if (service_notif->instance_id == data->instance_id && !strcmp (service_notif->service_path, data->service_path)) { enum pd_subsys_state state = ROOT_PD_UP; rc = register_notif_listener(service_notif, data, Loading Loading @@ -378,7 +380,8 @@ static void root_service_service_exit(struct qmi_client_info *data, mutex_lock(¬if_add_lock); mutex_lock(&service_list_lock); list_for_each_entry(service_notif, &service_list, list) { if (service_notif->instance_id == data->instance_id) { if (service_notif->instance_id == data->instance_id && !strcmp (data->service_path, service_notif->service_path)) { rc = service_notif_queue_notification(service_notif, SERVREG_NOTIF_SERVICE_STATE_DOWN_V01, &state); Loading Loading @@ -477,7 +480,8 @@ static void *add_service_notif(const char *service_path, int instance_id, */ mutex_lock(&qmi_list_lock); list_for_each_entry(tmp, &qmi_client_list, list) { if (tmp->instance_id == instance_id) { if (tmp->instance_id == instance_id && !strcmp (tmp->service_path, service_path)) { if (tmp->service_connected) { rc = register_notif_listener(service_notif, tmp, curr_state); Loading @@ -503,6 +507,8 @@ static void *add_service_notif(const char *service_path, int instance_id, } qmi_data->instance_id = instance_id; strlcpy(qmi_data->service_path, service_path, ARRAY_SIZE(service_notif->service_path)); qmi_data->svc_event_wq = create_singlethread_workqueue(subsys); if (!qmi_data->svc_event_wq) { rc = -ENOMEM; Loading Loading @@ -633,7 +639,8 @@ int service_notif_pd_restart(const char *service_path, int instance_id) int rc = 0; list_for_each_entry(tmp, &qmi_client_list, list) { if (tmp->instance_id == instance_id) { if (tmp->instance_id == instance_id && !strcmp (tmp->service_path, service_path)) { if (tmp->service_connected) { pr_info("Restarting service %s, instance-id %d\n", service_path, instance_id); Loading