Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ca2df45a072cef11143f9be8d36c3c256cbebd7b
Commit:     ca2df45a072cef11143f9be8d36c3c256cbebd7b
Parent:     c2cbdbb1583830b77f169a717407f035d6627793
Author:     Krzysztof Helt <[EMAIL PROTECTED]>
AuthorDate: Tue Oct 16 14:54:14 2007 +0200
Committer:  Jaroslav Kysela <[EMAIL PROTECTED]>
CommitDate: Tue Oct 16 16:51:26 2007 +0200

    [ALSA] This patch removes open_mutex from the ad1848-lib as
    
    open and close operations are called only from pcm layer
    and mutexed there with pcm->open_mutex.
    
    Signed-off-by: Krzysztof Helt <[EMAIL PROTECTED]>
    Signed-off-by: Takashi Iwai <[EMAIL PROTECTED]>
    Signed-off-by: Jaroslav Kysela <[EMAIL PROTECTED]>
---
 include/sound/ad1848.h        |    1 -
 sound/isa/ad1848/ad1848_lib.c |   14 +++-----------
 2 files changed, 3 insertions(+), 12 deletions(-)

diff --git a/include/sound/ad1848.h b/include/sound/ad1848.h
index b00eb61..d04f9e7 100644
--- a/include/sound/ad1848.h
+++ b/include/sound/ad1848.h
@@ -154,7 +154,6 @@ struct snd_ad1848 {
 #endif
 
        spinlock_t reg_lock;
-       struct mutex open_mutex;
 };
 
 /* exported functions */
diff --git a/sound/isa/ad1848/ad1848_lib.c b/sound/isa/ad1848/ad1848_lib.c
index 31209e1..a901cd1 100644
--- a/sound/isa/ad1848/ad1848_lib.c
+++ b/sound/isa/ad1848/ad1848_lib.c
@@ -378,11 +378,9 @@ static int snd_ad1848_open(struct snd_ad1848 *chip, 
unsigned int mode)
 {
        unsigned long flags;
 
-       mutex_lock(&chip->open_mutex);
-       if (chip->mode & AD1848_MODE_OPEN) {
-               mutex_unlock(&chip->open_mutex);
+       if (chip->mode & AD1848_MODE_OPEN)
                return -EAGAIN;
-       }
+
        snd_ad1848_mce_down(chip);
 
 #ifdef SNDRV_DEBUG_MCE
@@ -423,7 +421,6 @@ static int snd_ad1848_open(struct snd_ad1848 *chip, 
unsigned int mode)
        spin_unlock_irqrestore(&chip->reg_lock, flags);
 
        chip->mode = mode;
-       mutex_unlock(&chip->open_mutex);
 
        return 0;
 }
@@ -432,11 +429,8 @@ static void snd_ad1848_close(struct snd_ad1848 *chip)
 {
        unsigned long flags;
 
-       mutex_lock(&chip->open_mutex);
-       if (!chip->mode) {
-               mutex_unlock(&chip->open_mutex);
+       if (!chip->mode)
                return;
-       }
        /* disable IRQ */
        spin_lock_irqsave(&chip->reg_lock, flags);
        outb(0, AD1848P(chip, STATUS)); /* clear IRQ */
@@ -462,7 +456,6 @@ static void snd_ad1848_close(struct snd_ad1848 *chip)
        spin_unlock_irqrestore(&chip->reg_lock, flags);
 
        chip->mode = 0;
-       mutex_unlock(&chip->open_mutex);
 }
 
 /*
@@ -880,7 +873,6 @@ int snd_ad1848_create(struct snd_card *card,
        if (chip == NULL)
                return -ENOMEM;
        spin_lock_init(&chip->reg_lock);
-       mutex_init(&chip->open_mutex);
        chip->card = card;
        chip->port = port;
        chip->irq = -1;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to