usbusx2y.c (e3ee1e123183ca9847e74b7b8e2694c9e3b817a6) usbusx2y.c (bd7dd77c2a05c530684eea2e3af16449ae9c5d52)
1/*
2 * usbusy2y.c - ALSA USB US-428 Driver
3 *
42005-04-14 Karsten Wiese
5 Version 0.8.7.2:
6 Call snd_card_free() instead of snd_card_free_in_thread() to prevent oops with dead keyboard symptom.
7 Tested ok with kernel 2.6.12-rc2.
8

--- 323 unchanged lines hidden (view full) ---

332 },
333 { /* terminator */ }
334};
335
336static struct snd_card *usX2Y_create_card(struct usb_device *device)
337{
338 int dev;
339 struct snd_card * card;
1/*
2 * usbusy2y.c - ALSA USB US-428 Driver
3 *
42005-04-14 Karsten Wiese
5 Version 0.8.7.2:
6 Call snd_card_free() instead of snd_card_free_in_thread() to prevent oops with dead keyboard symptom.
7 Tested ok with kernel 2.6.12-rc2.
8

--- 323 unchanged lines hidden (view full) ---

332 },
333 { /* terminator */ }
334};
335
336static struct snd_card *usX2Y_create_card(struct usb_device *device)
337{
338 int dev;
339 struct snd_card * card;
340 int err;
341
340 for (dev = 0; dev < SNDRV_CARDS; ++dev)
341 if (enable[dev] && !snd_usX2Y_card_used[dev])
342 break;
343 if (dev >= SNDRV_CARDS)
344 return NULL;
342 for (dev = 0; dev < SNDRV_CARDS; ++dev)
343 if (enable[dev] && !snd_usX2Y_card_used[dev])
344 break;
345 if (dev >= SNDRV_CARDS)
346 return NULL;
345 card = snd_card_new(index[dev], id[dev], THIS_MODULE, sizeof(struct usX2Ydev));
346 if (!card)
347 err = snd_card_create(index[dev], id[dev], THIS_MODULE,
348 sizeof(struct usX2Ydev), &card);
349 if (err < 0)
347 return NULL;
348 snd_usX2Y_card_used[usX2Y(card)->chip.index = dev] = 1;
349 card->private_free = snd_usX2Y_card_private_free;
350 usX2Y(card)->chip.dev = device;
351 usX2Y(card)->chip.card = card;
352 init_waitqueue_head(&usX2Y(card)->prepare_wait_queue);
353 mutex_init(&usX2Y(card)->prepare_mutex);
354 INIT_LIST_HEAD(&usX2Y(card)->chip.midi_list);

--- 106 unchanged lines hidden ---
350 return NULL;
351 snd_usX2Y_card_used[usX2Y(card)->chip.index = dev] = 1;
352 card->private_free = snd_usX2Y_card_private_free;
353 usX2Y(card)->chip.dev = device;
354 usX2Y(card)->chip.card = card;
355 init_waitqueue_head(&usX2Y(card)->prepare_wait_queue);
356 mutex_init(&usX2Y(card)->prepare_mutex);
357 INIT_LIST_HEAD(&usX2Y(card)->chip.midi_list);

--- 106 unchanged lines hidden ---