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

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

Merge "ASoC: msm-lsm-client: Use freezable wait for EVENT_STATUS ioctl"

parents 419dc05c e912485e
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@
#include <linux/dma-mapping.h>
#include <linux/of.h>
#include <linux/msm_audio_ion.h>
#include <linux/freezer.h>
#include <sound/core.h>
#include <sound/soc.h>
#include <sound/soc-dapm.h>
@@ -521,11 +522,11 @@ static int msm_lsm_ioctl_shared(struct snd_pcm_substream *substream,
	case SNDRV_LSM_EVENT_STATUS:
		pr_debug("%s: Get event status\n", __func__);
		atomic_set(&prtd->event_wait_stop, 0);
		rc = wait_event_interruptible(prtd->event_wait,
		rc = wait_event_freezable(prtd->event_wait,
				(cmpxchg(&prtd->event_avail, 1, 0) ||
				 (xchg = atomic_cmpxchg(&prtd->event_wait_stop,
							1, 0))));
		pr_debug("%s: wait_event_interruptible %d event_wait_stop %d\n",
		pr_debug("%s: wait_event_freezable %d event_wait_stop %d\n",
			 __func__, rc, xchg);
		if (!rc && !xchg) {
			pr_debug("%s: New event available %ld\n", __func__,