[PATCH 09/18] ALSA: aoa: i2sbus: use DECLARE_COMPLETION_ONSTACK() macro
Pierre-Louis Bossart
pierre-louis.bossart at linux.intel.com
Wed Sep 2 23:21:24 CEST 2020
Follow recommendation in Documentation/scheduler/completion.rst and
use macro to declare local 'struct completion'
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart at linux.intel.com>
---
sound/aoa/soundbus/i2sbus/pcm.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/sound/aoa/soundbus/i2sbus/pcm.c b/sound/aoa/soundbus/i2sbus/pcm.c
index d350dbd24305..1c8e8131a716 100644
--- a/sound/aoa/soundbus/i2sbus/pcm.c
+++ b/sound/aoa/soundbus/i2sbus/pcm.c
@@ -254,12 +254,11 @@ static void i2sbus_wait_for_stop(struct i2sbus_dev *i2sdev,
struct pcm_info *pi)
{
unsigned long flags;
- struct completion done;
+ DECLARE_COMPLETION_ONSTACK(done);
long timeout;
spin_lock_irqsave(&i2sdev->low_lock, flags);
if (pi->dbdma_ring.stopping) {
- init_completion(&done);
pi->stop_completion = &done;
spin_unlock_irqrestore(&i2sdev->low_lock, flags);
timeout = wait_for_completion_timeout(&done, HZ);
--
2.25.1
More information about the Alsa-devel
mailing list