All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jarkko Nikula <jhnikula@gmail.com>
To: alsa-devel@alsa-project.org
Cc: Vinod Koul <vinod.koul@intel.com>,
	Mark Brown <broonie@opensource.wolfsonmicro.com>,
	Harsha Priya <priya.harsha@intel.com>,
	Liam Girdwood <lrg@slimlogic.co.uk>
Subject: [PATCH 1/2] ASoC: Fix module refcount for auxiliary devices
Date: Thu, 27 Jan 2011 16:24:21 +0200	[thread overview]
Message-ID: <1296138262-28113-2-git-send-email-jhnikula@gmail.com> (raw)
In-Reply-To: <1296138262-28113-1-git-send-email-jhnikula@gmail.com>

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.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Cc: Vinod Koul <vinod.koul@intel.com>
Cc: Harsha Priya <priya.harsha@intel.com>
---
 sound/soc/soc-core.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 8af47f7..e9f81c5 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1670,9 +1670,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;
-- 
1.7.2.3

  reply	other threads:[~2011-01-27 14:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-27 14:24 [PATCH 0/2] ASoC: Refcount fixes Jarkko Nikula
2011-01-27 14:24 ` Jarkko Nikula [this message]
2011-01-27 14:23   ` [PATCH 1/2] ASoC: Fix module refcount for auxiliary devices Mark Brown
2011-01-27 14:24 ` [PATCH 2/2] ASoC: soc-core: Increment codec and platform driver refcounts before probing Jarkko Nikula
2011-01-28 12:58   ` Mark Brown
2011-01-27 20:42 ` [PATCH 0/2] ASoC: Refcount fixes Liam Girdwood

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1296138262-28113-2-git-send-email-jhnikula@gmail.com \
    --to=jhnikula@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=lrg@slimlogic.co.uk \
    --cc=priya.harsha@intel.com \
    --cc=vinod.koul@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.