Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 143990
b: refs/heads/master
c: 5d4af1b
h: refs/heads/master
v: v3
  • Loading branch information
Karsten Wiese authored and Takashi Iwai committed Apr 20, 2009
1 parent 827b66f commit 2650bd3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 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: f600f6c4824d7e40be370f7e26ab0fbc3f6f911c
refs/heads/master: 5d4af1be06affa2b42cdf59cd376752be1f934b3
12 changes: 10 additions & 2 deletions trunk/sound/usb/usx2y/us122l.c
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,14 @@ static bool us122l_create_card(struct snd_card *card)
return true;
}

static void snd_us122l_free(struct snd_card *card)
{
struct us122l *us122l = US122L(card);
int index = us122l->chip.index;
if (index >= 0 && index < SNDRV_CARDS)
snd_us122l_card_used[index] = 0;
}

static int usx2y_create_card(struct usb_device *device, struct snd_card **cardp)
{
int dev;
Expand All @@ -494,7 +502,7 @@ static int usx2y_create_card(struct usb_device *device, struct snd_card **cardp)
if (err < 0)
return err;
snd_us122l_card_used[US122L(card)->chip.index = dev] = 1;

card->private_free = snd_us122l_free;
US122L(card)->chip.dev = device;
US122L(card)->chip.card = card;
mutex_init(&US122L(card)->mutex);
Expand Down Expand Up @@ -588,7 +596,7 @@ static void snd_us122l_disconnect(struct usb_interface *intf)
}

usb_put_intf(intf);
usb_put_dev(US122L(card)->chip.dev);
usb_put_dev(us122l->chip.dev);

while (atomic_read(&us122l->mmap_count))
msleep(500);
Expand Down

0 comments on commit 2650bd3

Please sign in to comment.