aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb/usx2y
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@alsa3.local>2008-12-28 10:45:02 -0500
committerTakashi Iwai <tiwai@suse.de>2009-01-12 09:21:19 -0500
commitbd7dd77c2a05c530684eea2e3af16449ae9c5d52 (patch)
treef26e8b6c83ed58d3c2d47f9df6373812db80a885 /sound/usb/usx2y
parente58de7baf7de11f01a675cbbf6ecc8a2758b9ca5 (diff)
ALSA: Convert to snd_card_create() in other sound/*
Convert from snd_card_new() to the new snd_card_create() function in other sound subdirectories. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/usx2y')
-rw-r--r--sound/usb/usx2y/us122l.c8
-rw-r--r--sound/usb/usx2y/usbusx2y.c7
2 files changed, 10 insertions, 5 deletions
diff --git a/sound/usb/usx2y/us122l.c b/sound/usb/usx2y/us122l.c
index 73e59f4403a4..b21bb475c0ff 100644
--- a/sound/usb/usx2y/us122l.c
+++ b/sound/usb/usx2y/us122l.c
@@ -482,14 +482,16 @@ static struct snd_card *usx2y_create_card(struct usb_device *device)
482{ 482{
483 int dev; 483 int dev;
484 struct snd_card *card; 484 struct snd_card *card;
485 int err;
486
485 for (dev = 0; dev < SNDRV_CARDS; ++dev) 487 for (dev = 0; dev < SNDRV_CARDS; ++dev)
486 if (enable[dev] && !snd_us122l_card_used[dev]) 488 if (enable[dev] && !snd_us122l_card_used[dev])
487 break; 489 break;
488 if (dev >= SNDRV_CARDS) 490 if (dev >= SNDRV_CARDS)
489 return NULL; 491 return NULL;
490 card = snd_card_new(index[dev], id[dev], THIS_MODULE, 492 err = snd_card_create(index[dev], id[dev], THIS_MODULE,
491 sizeof(struct us122l)); 493 sizeof(struct us122l), &card);
492 if (!card) 494 if (err < 0)
493 return NULL; 495 return NULL;
494 snd_us122l_card_used[US122L(card)->chip.index = dev] = 1; 496 snd_us122l_card_used[US122L(card)->chip.index = dev] = 1;
495 497
diff --git a/sound/usb/usx2y/usbusx2y.c b/sound/usb/usx2y/usbusx2y.c
index 11639bd72a51..b848a1806385 100644
--- a/sound/usb/usx2y/usbusx2y.c
+++ b/sound/usb/usx2y/usbusx2y.c
@@ -337,13 +337,16 @@ static struct snd_card *usX2Y_create_card(struct usb_device *device)
337{ 337{
338 int dev; 338 int dev;
339 struct snd_card * card; 339 struct snd_card * card;
340 int err;
341
340 for (dev = 0; dev < SNDRV_CARDS; ++dev) 342 for (dev = 0; dev < SNDRV_CARDS; ++dev)
341 if (enable[dev] && !snd_usX2Y_card_used[dev]) 343 if (enable[dev] && !snd_usX2Y_card_used[dev])
342 break; 344 break;
343 if (dev >= SNDRV_CARDS) 345 if (dev >= SNDRV_CARDS)
344 return NULL; 346 return NULL;
345 card = snd_card_new(index[dev], id[dev], THIS_MODULE, sizeof(struct usX2Ydev)); 347 err = snd_card_create(index[dev], id[dev], THIS_MODULE,
346 if (!card) 348 sizeof(struct usX2Ydev), &card);
349 if (err < 0)
347 return NULL; 350 return NULL;
348 snd_usX2Y_card_used[usX2Y(card)->chip.index = dev] = 1; 351 snd_usX2Y_card_used[usX2Y(card)->chip.index = dev] = 1;
349 card->private_free = snd_usX2Y_card_private_free; 352 card->private_free = snd_usX2Y_card_private_free;