All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Dmitry <dbaryshkov@gmail.com>
Cc: Takashi Iwai <tiwai@suse.de>, alsa-devel@alsa-project.org
Subject: Re: [PATCH 10/17] Don't lock the codec list in	snd_soc_dapm_new_widgets()
Date: Fri, 18 Jan 2008 10:18:16 +0000	[thread overview]
Message-ID: <20080118101816.GA19291@rakim.wolfsonmicro.main> (raw)
In-Reply-To: <bc64b4640801151540n4cb66f99u68ba0d42c91b5ff6@mail.gmail.com>

On Wed, Jan 16, 2008 at 02:40:55AM +0300, Dmitry wrote:

> I'm sorry, but I tested this patch only now. And I just got another
> message from lockdep:

Could you give this patch a try, please?

diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index f5fe7c6..283a0ba 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1131,7 +1131,6 @@ int snd_soc_register_card(struct snd_soc_device *socdev)
 	struct snd_soc_machine *machine = socdev->machine;
 	int ret = 0, i, ac97 = 0, err = 0;
 
-	mutex_lock(&codec->mutex);
 	for(i = 0; i < machine->num_links; i++) {
 		if (socdev->machine->dai_link[i].init) {
 			err = socdev->machine->dai_link[i].init(codec);
@@ -1157,12 +1156,14 @@ int snd_soc_register_card(struct snd_soc_device *socdev)
 		goto out;
 	}
 
+	mutex_lock(&codec->mutex);
 #ifdef CONFIG_SND_SOC_AC97_BUS
 	if (ac97) {
 		ret = soc_ac97_dev_register(codec);
 		if (ret < 0) {
 			printk(KERN_ERR "asoc: AC97 device register failed\n");
 			snd_card_free(codec->card);
+			mutex_unlock(&codec->mutex);
 			goto out;
 		}
 	}
@@ -1175,8 +1176,10 @@ int snd_soc_register_card(struct snd_soc_device *socdev)
 	err = device_create_file(socdev->dev, &dev_attr_codec_reg);
 	if (err < 0)
 		printk(KERN_WARNING "asoc: failed to add codec sysfs entries\n");
-out:
+
 	mutex_unlock(&codec->mutex);
+
+out:
 	return ret;
 }
 EXPORT_SYMBOL_GPL(snd_soc_register_card);

  parent reply	other threads:[~2008-01-18 10:18 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-10 13:16 [PATCH 01/17] Update MAINTAINERS for ALSA SoC Mark Brown
2008-01-10 13:17 ` [PATCH 02/17] Fix inverted Bass, Treble, Mono volume and Phone volume WM9712 mixer controls Mark Brown
2008-01-10 13:17   ` [PATCH 03/17] Add device level DAPM event Mark Brown
2008-01-10 13:17     ` [PATCH 04/17] ASoC TLV support Mark Brown
2008-01-10 13:17       ` [PATCH 05/17] Add D1 power event to power down event sequence Mark Brown
2008-01-10 13:17         ` [PATCH 06/17] Ensure PCMs are suspended Mark Brown
2008-01-10 13:17           ` [PATCH 07/17] Fix power switching support for DAPM_SWITCH widgets Mark Brown
2008-01-10 13:17             ` [PATCH 08/17] Clean up tabs Mark Brown
2008-01-10 13:17               ` [PATCH 09/17] Add support for passing kcontrols with events Mark Brown
2008-01-10 13:17                 ` [PATCH 10/17] Don't lock the codec list in snd_soc_dapm_new_widgets() Mark Brown
2008-01-10 13:17                   ` [PATCH 11/17] Bump ASoC core version number Mark Brown
2008-01-10 13:17                     ` [PATCH 12/17] Initial WM8753 TLV support for capture mixer Mark Brown
2008-01-10 13:17                       ` [PATCH 13/17] Reinitialise DMA on every resume Mark Brown
2008-01-10 13:17                         ` [PATCH 14/17] Support suspend and resume of the I2S interface on s3c24xx Mark Brown
2008-01-10 13:17                           ` [PATCH 15/17] ASoC: S3C2412 IIS driver Mark Brown
2008-01-10 13:17                             ` [PATCH 16/17] S3C2412: suspend and resume support Mark Brown
2008-01-10 13:17                               ` [PATCH 17/17] Preliminary ac97 drivers for Toshiba e800 PDAs Mark Brown
2008-01-15 23:40                   ` [PATCH 10/17] Don't lock the codec list in snd_soc_dapm_new_widgets() Dmitry
2008-01-16  0:28                     ` Mark Brown
2008-01-18 10:18                     ` Mark Brown [this message]
2008-01-18 21:41                       ` Juli - function of specific GPIOs? Pavel Hofman
2008-01-21 15:54                         ` Takashi Iwai
2008-01-21 16:05                           ` Pavel Hofman
2008-01-19 21:48                       ` [PATCH 10/17] Don't lock the codec list in snd_soc_dapm_new_widgets() Dmitry
2008-01-10 14:05 ` [PATCH 01/17] Update MAINTAINERS for ALSA SoC Takashi Iwai

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=20080118101816.GA19291@rakim.wolfsonmicro.main \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=dbaryshkov@gmail.com \
    --cc=tiwai@suse.de \
    /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.