Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 335645
b: refs/heads/master
c: 10e4423
h: refs/heads/master
i:
  335643: 4cbb7b2
v: v3
  • Loading branch information
Takashi Iwai committed Nov 14, 2012
1 parent baa2756 commit 5281a9e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: effded75e24c7941961d473e4f4babed4c52af3c
refs/heads/master: 10e44239f67d0b6fb74006e61a7e883b8075247a
6 changes: 3 additions & 3 deletions trunk/sound/usb/card.c
Original file line number Diff line number Diff line change
Expand Up @@ -559,9 +559,11 @@ static void snd_usb_audio_disconnect(struct usb_device *dev,
return;

card = chip->card;
mutex_lock(&register_mutex);
down_write(&chip->shutdown_rwsem);
chip->shutdown = 1;
up_write(&chip->shutdown_rwsem);

mutex_lock(&register_mutex);
chip->num_interfaces--;
if (chip->num_interfaces <= 0) {
snd_card_disconnect(card);
Expand All @@ -582,11 +584,9 @@ static void snd_usb_audio_disconnect(struct usb_device *dev,
snd_usb_mixer_disconnect(p);
}
usb_chip[chip->index] = NULL;
up_write(&chip->shutdown_rwsem);
mutex_unlock(&register_mutex);
snd_card_free_when_closed(card);
} else {
up_write(&chip->shutdown_rwsem);
mutex_unlock(&register_mutex);
}
}
Expand Down

0 comments on commit 5281a9e

Please sign in to comment.