Skip to contentSkip to conversation

ASoC: core: Log a warning when machines use soc-audio

PATCH In review Mark Brown 2 participants 2 messages Mar 2, 2012

Subsystems (2)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 ASoC: core: Log a warning when machines use soc-audio

snd_soc_register_card() has been available and strongly preferred since 2.6.38 but we're still seeing new drivers using it and the conversion rate for older machines has been low. Help address both issues by logging a warning when the soc-audio device probes.

---
 sound/soc/soc-core.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
sound/soc/soc-core.c +4 -0
index f52bf5b..8d2d066 100644
@@ -1644,6 +1644,10 @@ static int soc_probe(struct platform_device *pdev)
 	if (!card)
 		return -EINVAL;
 
+	dev_warn(&pdev->dev,
+		 "ASoC machine %s should use snd_soc_register_card()\n",
+		 card->name);
+
 	/* Bodge while we unpick instantiation */
 	card->dev = &pdev->dev;
 
Signature · 1 line
1.7.9.1
Acked-by on v1 1/1
#1 lore raw
Quoted 7 lines · Mark Brown

snd_soc_register_card() has been available and strongly preferred since 2.6.38 but we're still seeing new drivers using it and the conversion rate for older machines has been low. Help address both issues by logging a warning when the soc-audio device probes.

---