anolis: sw64: sound: fix compile error when CONFIG_SND_DUMMY=y
ANBZ: #4688 In a previous commit, #include <linux/io.h> was added inside a function, which caused compilation errors. To resolve this issue, the header file has been moved to the beginning of the file to ensure successful compilation. This change does not affect functionality and is purely a fix for the compilation error. Fixes: ce16ff1a7368 ("anolis: sw64: sound: avoid pagefault in pcm driver's memset") Signed-off-by: Si Ye <siye@wxiat.com> Reviewed-by: He Sheng <hesheng@wxiat.com> Signed-off-by: Gu Zitao <guzitao@wxiat.com> Reviewed-by: Min Li <gumi@linux.alibaba.com> Link: https://gitee.com/anolis/cloud-kernel/pulls/5372
This commit is contained in:
parent
5e1ba0de7a
commit
fea3ad5832
|
@ -23,6 +23,9 @@
|
|||
#include <linux/export.h>
|
||||
#include <sound/core.h>
|
||||
#include <sound/pcm.h>
|
||||
#ifdef CONFIG_SW64
|
||||
#include <linux/io.h>
|
||||
#endif
|
||||
|
||||
#include "pcm_local.h"
|
||||
|
||||
|
@ -435,7 +438,6 @@ int snd_pcm_format_set_silence(snd_pcm_format_t format, void *data, unsigned int
|
|||
if (pcm_formats[(INT)format].signd == 1 || width <= 8) {
|
||||
unsigned int bytes = samples * width / 8;
|
||||
#ifdef CONFIG_SW64
|
||||
#include <linux/io.h>
|
||||
memset_io(data, *pat, bytes);
|
||||
#else
|
||||
memset(data, *pat, bytes);
|
||||
|
|
Loading…
Reference in New Issue