From 0821fd77a1129cf4848d82d9275fb4e90e02edf8 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Sun, 17 Nov 2019 11:05:12 +0100
Subject: [PATCH] ALSA: pcm: Move PCM_RUNTIME_CHECK() macro into local header
Git-commit: 0821fd77a1129cf4848d82d9275fb4e90e02edf8
Patch-mainline: v5.5-rc1
References: git-fixes
It should be used only in the PCM core code locally.
Link: https://lore.kernel.org/r/20191117085308.23915-6-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
include/sound/pcm.h | 2 --
sound/core/pcm_local.h | 2 ++
sound/core/pcm_memory.c | 1 +
3 files changed, 3 insertions(+), 2 deletions(-)
--- a/include/sound/pcm.h
+++ b/include/sound/pcm.h
@@ -1339,8 +1339,6 @@ static inline void snd_pcm_limit_isa_dma
(IEC958_AES1_CON_PCM_CODER<<8)|\
(IEC958_AES3_CON_FS_48000<<24))
-#define PCM_RUNTIME_CHECK(sub) snd_BUG_ON(!(sub) || !(sub)->runtime)
-
const char *snd_pcm_format_name(snd_pcm_format_t format);
/**
--- a/sound/core/pcm_local.h
+++ b/sound/core/pcm_local.h
@@ -67,4 +67,6 @@ static inline void snd_pcm_timer_done(st
void __snd_pcm_xrun(struct snd_pcm_substream *substream);
void snd_pcm_group_init(struct snd_pcm_group *group);
+#define PCM_RUNTIME_CHECK(sub) snd_BUG_ON(!(sub) || !(sub)->runtime)
+
#endif /* __SOUND_CORE_PCM_LOCAL_H */
--- a/sound/core/pcm_memory.c
+++ b/sound/core/pcm_memory.c
@@ -15,6 +15,7 @@
#include <sound/pcm.h>
#include <sound/info.h>
#include <sound/initval.h>
+#include "pcm_local.h"
static int preallocate_dma = 1;
module_param(preallocate_dma, int, 0444);