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

Commit 63875384 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Slim_ngd: Modify waiting mechanism in kthread"

parents dc4e1d88 c04d8710
Loading
Loading
Loading
Loading
+2 −11
Original line number Diff line number Diff line
@@ -1074,11 +1074,7 @@ static int ngd_slim_rx_msgq_thread(void *data)

	while (!kthread_should_stop()) {
		set_current_state(TASK_INTERRUPTIBLE);
		ret = wait_for_completion_interruptible(notify);
		if (ret) {
			dev_err(dev->dev, "rx thread wait err:%d", ret);
			continue;
		}
		wait_for_completion(notify);
		/* 1 irq notification per message */
		if (dev->use_rx_msgqs != MSM_MSGQ_ENABLED) {
			msm_slim_rx_dequeue(dev, (u8 *)buffer);
@@ -1116,12 +1112,7 @@ static int ngd_notify_slaves(void *data)
	int ret, i = 0;
	while (!kthread_should_stop()) {
		set_current_state(TASK_INTERRUPTIBLE);
		ret = wait_for_completion_timeout(&dev->qmi.slave_notify,
								HZ);
		if (!ret) {
			dev_dbg(dev->dev, "slave thread wait err:%d", ret);
			continue;
		}
		wait_for_completion(&dev->qmi.slave_notify);
		/* Probe devices for first notification */
		if (!i) {
			dev->err = 0;