Skip to contentSkip to conversation

ASoC: imx-audmux: Fix section mismatch

PATCH Applied Lars-Peter Clausen 2 participants 2 messages Apr 24, 2014

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: imx-audmux: Fix section mismatch

audmux_debugfs_init() is marked as __init, but is called from imx_audmux_probe() which is not marked as __init. This creates a section mismatch and a potential runtime crash (if imx_audmux_probe() is called after the .init section was dropped). This patch removes the __init annotation from audmux_debugfs_init(), which fixes the following warning:

	WARNING: sound/soc/built-in.o(.text+0x86960): Section mismatch in reference
	from the function imx_audmux_probe() to the function
	.init.text:audmux_debugfs_init()
---
 sound/soc/fsl/imx-audmux.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/fsl/imx-audmux.c +1 -1
index ac86993..267717a 100644
@@ -145,7 +145,7 @@ static const struct file_operations audmux_debugfs_fops = {
 	.llseek = default_llseek,
 };
 
-static void __init audmux_debugfs_init(void)
+static void audmux_debugfs_init(void)
 {
 	int i;
 	char buf[20];
Signature · 1 line
1.8.0
maintainer Applied
#1 lore raw
Quoted 5 lines · Lars-Peter Clausen

audmux_debugfs_init() is marked as __init, but is called from imx_audmux_probe() which is not marked as __init. This creates a section mismatch and a potential runtime crash (if imx_audmux_probe() is called after the .init section was dropped). This patch removes the __init annotation from audmux_debugfs_init(), which fixes the following warning:

Applied, thanks.