[alsa-devel] [PATCH 3/3] ASoC/codecs: jz4725b: Make probe function __init_or_module

Paul Cercueil paul at crapouillou.net
Fri Jun 7 18:15:00 CEST 2019


This allows the probe function to be dropped after the kernel finished
its initialization, in the case where the driver was not compiled as a
module.

Signed-off-by: Paul Cercueil <paul at crapouillou.net>
---
 sound/soc/codecs/jz4725b.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/jz4725b.c b/sound/soc/codecs/jz4725b.c
index 766354c73076..eef7221e4acd 100644
--- a/sound/soc/codecs/jz4725b.c
+++ b/sound/soc/codecs/jz4725b.c
@@ -541,7 +541,7 @@ static const struct regmap_config jz4725b_codec_regmap_config = {
 	.cache_type = REGCACHE_FLAT,
 };
 
-static int jz4725b_codec_probe(struct platform_device *pdev)
+static int __init_or_module jz4725b_codec_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	struct jz_icdc *icdc;
-- 
2.21.0.593.g511ec345e18



More information about the Alsa-devel mailing list