Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0029f6a8 authored by David Keitel's avatar David Keitel Committed by Gerrit - the friendly Code Review server
Browse files

soc: qcom: service-notifier: update state after queuing notification



On establishing a connection with the remote service and being notified
of a service's current state for the first time, first queue the service
notification for the new state. Only then, update the current state of
the service notifier.

Also, to prevent a premature update of the service notifier state,
remove the state update from send_notif_listener_msg_req.

Change-Id: I43288b1ae23081721a9baef5a5098891afd8ff64
Signed-off-by: default avatarDavid Keitel <dkeitel@codeaurora.org>
parent 13848461
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -334,7 +334,6 @@ static int send_notif_listener_msg_req(struct service_notif_info *service_notif,
		pr_err("Invalid notif info 0x%x\n", resp.curr_state);
		rc = -EINVAL;
	}
	service_notif->curr_state = resp.curr_state;
	*curr_state = resp.curr_state;
	return rc;
}
@@ -528,6 +527,7 @@ static void *add_service_notif(const char *service_path, int instance_id,
					kfree(service_notif);
					return ERR_PTR(rc);
				}
				service_notif->curr_state = *curr_state;
			}
			mutex_unlock(&qmi_list_lock);
			goto add_service_list;