alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: alsa-devel@alsa-project.org
Cc: Takashi Iwai <tiwai@suse.de>
Subject: [PATCH 2/3] ALSA: info - Remove BKL
Date: Wed, 14 Apr 2010 10:14:21 +0200	[thread overview]
Message-ID: <1271232862-16183-3-git-send-email-tiwai@suse.de> (raw)
In-Reply-To: <1271232862-16183-1-git-send-email-tiwai@suse.de>

Use the fine-grained mutex for the assigned info object, instead.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 sound/core/info.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/core/info.c b/sound/core/info.c
index d749a0d..fe83661 100644
--- a/sound/core/info.c
+++ b/sound/core/info.c
@@ -167,7 +167,7 @@ static loff_t snd_info_entry_llseek(struct file *file, loff_t offset, int orig)
 
 	data = file->private_data;
 	entry = data->entry;
-	lock_kernel();
+	mutex_lock(&entry->access);
 	switch (entry->content) {
 	case SNDRV_INFO_CONTENT_TEXT:
 		switch (orig) {
@@ -196,7 +196,7 @@ static loff_t snd_info_entry_llseek(struct file *file, loff_t offset, int orig)
 	}
 	ret = -ENXIO;
 out:
-	unlock_kernel();
+	mutex_unlock(&entry->access);
 	return ret;
 }
 
-- 
1.7.0.4

  parent reply	other threads:[~2010-04-14  8:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-14  8:14 BKL removal from ALSA core Takashi Iwai
2010-04-14  8:14 ` [PATCH 1/3] ALSA: pcm - Remove BKL from async callback Takashi Iwai
2010-04-14  8:14 ` Takashi Iwai [this message]
2010-04-14  8:14 ` [PATCH 3/3] ALSA: Remove BKL from open multiplexer 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=1271232862-16183-3-git-send-email-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).