Skip to contentSkip to conversation

ASoC: Fix module refcount for auxiliary devices

PATCH Applied Jarkko Nikula 3 participants 3 messages Jan 26, 2011

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

PATCH 1/1 ASoC: Fix module refcount for auxiliary devices

Commit f6c2ed5 "ASoC: Fix the device references to codec and platform drivers" moved codec driver refcount increments from soc_bind_dai_link into soc_probe_codec.

However, the commit didn't remove try_module_get from soc_probe_aux_dev so the auxiliary device reference counts are incremented twice as the soc_probe_codec is called from soc_probe_aux_dev too.

Cc Vinod Koul <[email protected]>
Cc Harsha Priya <[email protected]>
---
 sound/soc/soc-core.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)
sound/soc/soc-core.c +0 -3
index bac7291..c4b6061 100644
@@ -1664,9 +1664,6 @@ static int soc_probe_aux_dev(struct snd_soc_card *card, int num)
 	goto out;
 
 found:
-	if (!try_module_get(codec->dev->driver->owner))
-		return -ENODEV;
-
 	ret = soc_probe_codec(card, codec);
 	if (ret < 0)
 		return ret;
Signature · 1 line
1.7.2.3
Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · Jarkko Nikula

Commit f6c2ed5 "ASoC: Fix the device references to codec and platform drivers" moved codec driver refcount increments from soc_bind_dai_link into soc_probe_codec.

Quoted 8 lines

However, the commit didn't remove try_module_get from soc_probe_aux_dev so the auxiliary device reference counts are incremented twice as the soc_probe_codec is called from soc_probe_aux_dev too.

Cc Vinod Koul <[email protected]>
Cc Harsha Priya <[email protected]>

---

Signature · 3 lines
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk
Applied
#2 lore raw
In reply to Jarkko Nikula
Quoted 3 lines · Jarkko Nikula

However, the commit didn't remove try_module_get from soc_probe_aux_dev so the auxiliary device reference counts are incremented twice as the soc_probe_codec is called from soc_probe_aux_dev too.

Applied, thanks.