diff mbox

ASoC: imx-audmux: Fix section mismatch

Message ID 1398320756-18123-1-git-send-email-lars@metafoo.de (mailing list archive)
State Accepted
Commit b8909783a22b4f169ade830e0aa6dafe313426f1
Headers show

Commit Message

Lars-Peter Clausen April 24, 2014, 6:25 a.m. UTC
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()

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 sound/soc/fsl/imx-audmux.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Mark Brown April 24, 2014, 10:23 a.m. UTC | #1
On Thu, Apr 24, 2014 at 08:25:56AM +0200, Lars-Peter Clausen wrote:
> 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.
diff mbox

Patch

diff --git a/sound/soc/fsl/imx-audmux.c b/sound/soc/fsl/imx-audmux.c
index ac86993..267717a 100644
--- a/sound/soc/fsl/imx-audmux.c
+++ b/sound/soc/fsl/imx-audmux.c
@@ -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];