[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1421660576-8435-2-git-send-email-jslaby@suse.cz>
Date: Mon, 19 Jan 2015 10:42:55 +0100
From: Jiri Slaby <jslaby@...e.cz>
To: tiwai@...e.de
Cc: linux-kernel@...r.kernel.org, Jiri Slaby <jslaby@...e.cz>,
Jaroslav Kysela <perex@...ex.cz>, alsa-devel@...a-project.org
Subject: [PATCH 2/3] sound: dummy, use del_timer_sync
Wait for the timer to really quit, not only by ensuring it is not in
the critical section.
BTW the spin_lock in here does not disable BH, so that it could
deadlock.
Signed-off-by: Jiri Slaby <jslaby@...e.cz>
Cc: Jaroslav Kysela <perex@...ex.cz>
Cc: Takashi Iwai <tiwai@...e.de>
Cc: alsa-devel@...a-project.org
---
sound/drivers/dummy.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/sound/drivers/dummy.c b/sound/drivers/dummy.c
index d11baaf0f0b4..6d6bf4093583 100644
--- a/sound/drivers/dummy.c
+++ b/sound/drivers/dummy.c
@@ -281,9 +281,9 @@ static int dummy_systimer_start(struct snd_pcm_substream *substream)
static int dummy_systimer_stop(struct snd_pcm_substream *substream)
{
struct dummy_systimer_pcm *dpcm = substream->runtime->private_data;
- spin_lock(&dpcm->lock);
- del_timer(&dpcm->timer);
- spin_unlock(&dpcm->lock);
+
+ del_timer_sync(&dpcm->timer);
+
return 0;
}
--
2.2.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists