ALSA: pcm: Move PCM_RUNTIME_CHECK() macro into local header
authorTakashi Iwai <tiwai@suse.de>
Sun, 17 Nov 2019 10:05:12 +0000 (11:05 +0100)
committerTakashi Iwai <tiwai@suse.de>
Wed, 20 Nov 2019 18:39:54 +0000 (19:39 +0100)
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
sound/core/pcm_local.h
sound/core/pcm_memory.c

index 253d15c61ce2c3811a01ec14ec47e56fb7ca09bb..25563317782c914453ed0796893a3b2c07d6adee 100644 (file)
@@ -1336,8 +1336,6 @@ static inline void snd_pcm_limit_isa_dma_size(int dma, size_t *max)
                                         (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);
 
 /**
index 5565e1c4196a0c0f3c991fdc2f0cecf041e3be3a..384efd0029849c3abc6742ad9834003881d7346b 100644 (file)
@@ -72,4 +72,6 @@ struct page *snd_pcm_sgbuf_ops_page(struct snd_pcm_substream *substream,
                                    unsigned long offset);
 #endif
 
+#define PCM_RUNTIME_CHECK(sub) snd_BUG_ON(!(sub) || !(sub)->runtime)
+
 #endif /* __SOUND_CORE_PCM_LOCAL_H */
index 73b770db2372ddd3b792d7c885772a4f9cfef8a9..d4702cc1d3766080ad635132bfe18fc01c1e3444 100644 (file)
@@ -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);