Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2a2a5dddece676acbe3775e5ca9961f325717022
Commit:     2a2a5dddece676acbe3775e5ca9961f325717022
Parent:     7fbe3ca571e4b0795b729658e3d76824be54cb18
Author:     Takashi Iwai <[EMAIL PROTECTED]>
AuthorDate: Mon Jan 8 17:42:22 2007 +0100
Committer:  Jaroslav Kysela <[EMAIL PROTECTED]>
CommitDate: Tue Jan 9 09:14:15 2007 +0100

    [ALSA] usbaudio - Fix kobject_add() error at reconnection
    
    Fixed the error from kobject_add() at reconnection the usb audio device.
    This happens when an app keeps opening a device while the device is
    replugged, due to the confliction of the internal bookkept index and
    the really empty slot.
    
    Signed-off-by: Takashi Iwai <[EMAIL PROTECTED]>
    Signed-off-by: Jaroslav Kysela <[EMAIL PROTECTED]>
---
 sound/usb/usbaudio.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c
index 5f160ee..19bdcc7 100644
--- a/sound/usb/usbaudio.c
+++ b/sound/usb/usbaudio.c
@@ -3286,6 +3286,7 @@ static void snd_usb_audio_create_proc(struct 
snd_usb_audio *chip)
 
 static int snd_usb_audio_free(struct snd_usb_audio *chip)
 {
+       usb_chip[chip->index] = NULL;
        kfree(chip);
        return 0;
 }
@@ -3547,7 +3548,6 @@ static void snd_usb_audio_disconnect(struct usb_device 
*dev, void *ptr)
                list_for_each(p, &chip->mixer_list) {
                        snd_usb_mixer_disconnect(p);
                }
-               usb_chip[chip->index] = NULL;
                mutex_unlock(&register_mutex);
                snd_card_free_when_closed(card);
        } else {
-
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