aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/aoa/core/alsa.c7
-rw-r--r--sound/arm/aaci.c7
-rw-r--r--sound/arm/pxa2xx-ac97.c7
-rw-r--r--sound/arm/sa11xx-uda1341.c7
-rw-r--r--sound/drivers/dummy.c8
-rw-r--r--sound/drivers/ml403-ac97cr.c6
-rw-r--r--sound/drivers/mpu401/mpu401.c6
-rw-r--r--sound/drivers/mtpav.c6
-rw-r--r--sound/drivers/mts64.c6
-rw-r--r--sound/drivers/pcsp/pcsp.c6
-rw-r--r--sound/drivers/portman2x4.c6
-rw-r--r--sound/drivers/serial-u16550.c6
-rw-r--r--sound/drivers/virmidi.c8
-rw-r--r--sound/mips/au1x00.c7
-rw-r--r--sound/mips/hal2.c6
-rw-r--r--sound/mips/sgio2audio.c6
-rw-r--r--sound/parisc/harmony.c6
-rw-r--r--sound/pcmcia/pdaudiocf/pdaudiocf.c8
-rw-r--r--sound/pcmcia/vx/vxpocket.c8
-rw-r--r--sound/ppc/powermac.c6
-rw-r--r--sound/ppc/snd_ps3.c6
-rw-r--r--sound/sh/aica.c8
-rw-r--r--sound/soc/soc-core.c8
-rw-r--r--sound/sparc/amd7930.c7
-rw-r--r--sound/sparc/cs4231.c9
-rw-r--r--sound/sparc/dbri.c8
-rw-r--r--sound/spi/at73c213.c7
-rw-r--r--sound/usb/caiaq/caiaq-device.c7
-rw-r--r--sound/usb/usbaudio.c6
-rw-r--r--sound/usb/usx2y/us122l.c8
-rw-r--r--sound/usb/usx2y/usbusx2y.c7
31 files changed, 111 insertions, 103 deletions
diff --git a/sound/aoa/core/alsa.c b/sound/aoa/core/alsa.c
index 617850463582..0fa3855b4790 100644
--- a/sound/aoa/core/alsa.c
+++ b/sound/aoa/core/alsa.c
@@ -23,9 +23,10 @@ int aoa_alsa_init(char *name, struct module *mod, struct device *dev)
23 /* cannot be EEXIST due to usage in aoa_fabric_register */ 23 /* cannot be EEXIST due to usage in aoa_fabric_register */
24 return -EBUSY; 24 return -EBUSY;
25 25
26 alsa_card = snd_card_new(index, name, mod, sizeof(struct aoa_card)); 26 err = snd_card_create(index, name, mod, sizeof(struct aoa_card),
27 if (!alsa_card) 27 &alsa_card);
28 return -ENOMEM; 28 if (err < 0)
29 return err;
29 aoa_card = alsa_card->private_data; 30 aoa_card = alsa_card->private_data;
30 aoa_card->alsa_card = alsa_card; 31 aoa_card->alsa_card = alsa_card;
31 alsa_card->dev = dev; 32 alsa_card->dev = dev;
diff --git a/sound/arm/aaci.c b/sound/arm/aaci.c
index 89096e811a4b..7d39aac9ec14 100644
--- a/sound/arm/aaci.c
+++ b/sound/arm/aaci.c
@@ -995,10 +995,11 @@ static struct aaci * __devinit aaci_init_card(struct amba_device *dev)
995{ 995{
996 struct aaci *aaci; 996 struct aaci *aaci;
997 struct snd_card *card; 997 struct snd_card *card;
998 int err;
998 999
999 card = snd_card_new(SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1, 1000 err = snd_card_create(SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1,
1000 THIS_MODULE, sizeof(struct aaci)); 1001 THIS_MODULE, sizeof(struct aaci), &card);
1001 if (card == NULL) 1002 if (err < 0)
1002 return NULL; 1003 return NULL;
1003 1004
1004 card->private_free = aaci_free_card; 1005 card->private_free = aaci_free_card;
diff --git a/sound/arm/pxa2xx-ac97.c b/sound/arm/pxa2xx-ac97.c
index 85cf591d4e11..7ed100c80a5f 100644
--- a/sound/arm/pxa2xx-ac97.c
+++ b/sound/arm/pxa2xx-ac97.c
@@ -173,10 +173,9 @@ static int __devinit pxa2xx_ac97_probe(struct platform_device *dev)
173 struct snd_ac97_template ac97_template; 173 struct snd_ac97_template ac97_template;
174 int ret; 174 int ret;
175 175
176 ret = -ENOMEM; 176 ret = snd_card_create(SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1,
177 card = snd_card_new(SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1, 177 THIS_MODULE, 0, &card);
178 THIS_MODULE, 0); 178 if (ret < 0)
179 if (!card)
180 goto err; 179 goto err;
181 180
182 card->dev = &dev->dev; 181 card->dev = &dev->dev;
diff --git a/sound/arm/sa11xx-uda1341.c b/sound/arm/sa11xx-uda1341.c
index 1dcd51d81d10..51d708c31e65 100644
--- a/sound/arm/sa11xx-uda1341.c
+++ b/sound/arm/sa11xx-uda1341.c
@@ -887,9 +887,10 @@ static int __devinit sa11xx_uda1341_probe(struct platform_device *devptr)
887 struct sa11xx_uda1341 *chip; 887 struct sa11xx_uda1341 *chip;
888 888
889 /* register the soundcard */ 889 /* register the soundcard */
890 card = snd_card_new(-1, id, THIS_MODULE, sizeof(struct sa11xx_uda1341)); 890 err = snd_card_create(-1, id, THIS_MODULE,
891 if (card == NULL) 891 sizeof(struct sa11xx_uda1341), &card);
892 return -ENOMEM; 892 if (err < 0)
893 return err;
893 894
894 chip = card->private_data; 895 chip = card->private_data;
895 spin_lock_init(&chip->s[0].dma_lock); 896 spin_lock_init(&chip->s[0].dma_lock);
diff --git a/sound/drivers/dummy.c b/sound/drivers/dummy.c
index 73be7e14a603..54239d2e0997 100644
--- a/sound/drivers/dummy.c
+++ b/sound/drivers/dummy.c
@@ -588,10 +588,10 @@ static int __devinit snd_dummy_probe(struct platform_device *devptr)
588 int idx, err; 588 int idx, err;
589 int dev = devptr->id; 589 int dev = devptr->id;
590 590
591 card = snd_card_new(index[dev], id[dev], THIS_MODULE, 591 err = snd_card_create(index[dev], id[dev], THIS_MODULE,
592 sizeof(struct snd_dummy)); 592 sizeof(struct snd_dummy), &card);
593 if (card == NULL) 593 if (err < 0)
594 return -ENOMEM; 594 return err;
595 dummy = card->private_data; 595 dummy = card->private_data;
596 dummy->card = card; 596 dummy->card = card;
597 for (idx = 0; idx < MAX_PCM_DEVICES && idx < pcm_devs[dev]; idx++) { 597 for (idx = 0; idx < MAX_PCM_DEVICES && idx < pcm_devs[dev]; idx++) {
diff --git a/sound/drivers/ml403-ac97cr.c b/sound/drivers/ml403-ac97cr.c
index 7783843ca9ae..1950ffce2b54 100644
--- a/sound/drivers/ml403-ac97cr.c
+++ b/sound/drivers/ml403-ac97cr.c
@@ -1279,9 +1279,9 @@ static int __devinit snd_ml403_ac97cr_probe(struct platform_device *pfdev)
1279 if (!enable[dev]) 1279 if (!enable[dev])
1280 return -ENOENT; 1280 return -ENOENT;
1281 1281
1282 card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0); 1282 err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
1283 if (card == NULL) 1283 if (err < 0)
1284 return -ENOMEM; 1284 return err;
1285 err = snd_ml403_ac97cr_create(card, pfdev, &ml403_ac97cr); 1285 err = snd_ml403_ac97cr_create(card, pfdev, &ml403_ac97cr);
1286 if (err < 0) { 1286 if (err < 0) {
1287 PDEBUG(INIT_FAILURE, "probe(): create failed!\n"); 1287 PDEBUG(INIT_FAILURE, "probe(): create failed!\n");
diff --git a/sound/drivers/mpu401/mpu401.c b/sound/drivers/mpu401/mpu401.c
index 5b996f3faba5..149d05a8202d 100644
--- a/sound/drivers/mpu401/mpu401.c
+++ b/sound/drivers/mpu401/mpu401.c
@@ -73,9 +73,9 @@ static int snd_mpu401_create(int dev, struct snd_card **rcard)
73 snd_printk(KERN_ERR "the uart_enter option is obsolete; remove it\n"); 73 snd_printk(KERN_ERR "the uart_enter option is obsolete; remove it\n");
74 74
75 *rcard = NULL; 75 *rcard = NULL;
76 card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0); 76 err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
77 if (card == NULL) 77 if (err < 0)
78 return -ENOMEM; 78 return err;
79 strcpy(card->driver, "MPU-401 UART"); 79 strcpy(card->driver, "MPU-401 UART");
80 strcpy(card->shortname, card->driver); 80 strcpy(card->shortname, card->driver);
81 sprintf(card->longname, "%s at %#lx, ", card->shortname, port[dev]); 81 sprintf(card->longname, "%s at %#lx, ", card->shortname, port[dev]);
diff --git a/sound/drivers/mtpav.c b/sound/drivers/mtpav.c
index 5b89c0883d60..c3e9833dcfd9 100644
--- a/sound/drivers/mtpav.c
+++ b/sound/drivers/mtpav.c
@@ -696,9 +696,9 @@ static int __devinit snd_mtpav_probe(struct platform_device *dev)
696 int err; 696 int err;
697 struct mtpav *mtp_card; 697 struct mtpav *mtp_card;
698 698
699 card = snd_card_new(index, id, THIS_MODULE, sizeof(*mtp_card)); 699 err = snd_card_create(index, id, THIS_MODULE, sizeof(*mtp_card), &card);
700 if (! card) 700 if (err < 0)
701 return -ENOMEM; 701 return err;
702 702
703 mtp_card = card->private_data; 703 mtp_card = card->private_data;
704 spin_lock_init(&mtp_card->spinlock); 704 spin_lock_init(&mtp_card->spinlock);
diff --git a/sound/drivers/mts64.c b/sound/drivers/mts64.c
index 87ba1ddc0115..33d9db782e07 100644
--- a/sound/drivers/mts64.c
+++ b/sound/drivers/mts64.c
@@ -957,10 +957,10 @@ static int __devinit snd_mts64_probe(struct platform_device *pdev)
957 if ((err = snd_mts64_probe_port(p)) < 0) 957 if ((err = snd_mts64_probe_port(p)) < 0)
958 return err; 958 return err;
959 959
960 card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0); 960 err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
961 if (card == NULL) { 961 if (err < 0) {
962 snd_printd("Cannot create card\n"); 962 snd_printd("Cannot create card\n");
963 return -ENOMEM; 963 return err;
964 } 964 }
965 strcpy(card->driver, DRIVER_NAME); 965 strcpy(card->driver, DRIVER_NAME);
966 strcpy(card->shortname, "ESI " CARD_NAME); 966 strcpy(card->shortname, "ESI " CARD_NAME);
diff --git a/sound/drivers/pcsp/pcsp.c b/sound/drivers/pcsp/pcsp.c
index a4049eb94d35..aa2ae07a76d5 100644
--- a/sound/drivers/pcsp/pcsp.c
+++ b/sound/drivers/pcsp/pcsp.c
@@ -98,9 +98,9 @@ static int __devinit snd_card_pcsp_probe(int devnum, struct device *dev)
98 hrtimer_init(&pcsp_chip.timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); 98 hrtimer_init(&pcsp_chip.timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
99 pcsp_chip.timer.function = pcsp_do_timer; 99 pcsp_chip.timer.function = pcsp_do_timer;
100 100
101 card = snd_card_new(index, id, THIS_MODULE, 0); 101 err = snd_card_create(index, id, THIS_MODULE, 0, &card);
102 if (!card) 102 if (err < 0)
103 return -ENOMEM; 103 return err;
104 104
105 err = snd_pcsp_create(card); 105 err = snd_pcsp_create(card);
106 if (err < 0) { 106 if (err < 0) {
diff --git a/sound/drivers/portman2x4.c b/sound/drivers/portman2x4.c
index b1c047ec19af..60158e2e0eaf 100644
--- a/sound/drivers/portman2x4.c
+++ b/sound/drivers/portman2x4.c
@@ -746,10 +746,10 @@ static int __devinit snd_portman_probe(struct platform_device *pdev)
746 if ((err = snd_portman_probe_port(p)) < 0) 746 if ((err = snd_portman_probe_port(p)) < 0)
747 return err; 747 return err;
748 748
749 card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0); 749 err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
750 if (card == NULL) { 750 if (err < 0) {
751 snd_printd("Cannot create card\n"); 751 snd_printd("Cannot create card\n");
752 return -ENOMEM; 752 return err;
753 } 753 }
754 strcpy(card->driver, DRIVER_NAME); 754 strcpy(card->driver, DRIVER_NAME);
755 strcpy(card->shortname, CARD_NAME); 755 strcpy(card->shortname, CARD_NAME);
diff --git a/sound/drivers/serial-u16550.c b/sound/drivers/serial-u16550.c
index d8aab9da97c2..891d081e4825 100644
--- a/sound/drivers/serial-u16550.c
+++ b/sound/drivers/serial-u16550.c
@@ -936,9 +936,9 @@ static int __devinit snd_serial_probe(struct platform_device *devptr)
936 return -ENODEV; 936 return -ENODEV;
937 } 937 }
938 938
939 card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0); 939 err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
940 if (card == NULL) 940 if (err < 0)
941 return -ENOMEM; 941 return err;
942 942
943 strcpy(card->driver, "Serial"); 943 strcpy(card->driver, "Serial");
944 strcpy(card->shortname, "Serial MIDI (UART16550A)"); 944 strcpy(card->shortname, "Serial MIDI (UART16550A)");
diff --git a/sound/drivers/virmidi.c b/sound/drivers/virmidi.c
index f79e3614079d..6f48711818f3 100644
--- a/sound/drivers/virmidi.c
+++ b/sound/drivers/virmidi.c
@@ -90,10 +90,10 @@ static int __devinit snd_virmidi_probe(struct platform_device *devptr)
90 int idx, err; 90 int idx, err;
91 int dev = devptr->id; 91 int dev = devptr->id;
92 92
93 card = snd_card_new(index[dev], id[dev], THIS_MODULE, 93 err = snd_card_create(index[dev], id[dev], THIS_MODULE,
94 sizeof(struct snd_card_virmidi)); 94 sizeof(struct snd_card_virmidi), &card);
95 if (card == NULL) 95 if (err < 0)
96 return -ENOMEM; 96 return err;
97 vmidi = (struct snd_card_virmidi *)card->private_data; 97 vmidi = (struct snd_card_virmidi *)card->private_data;
98 vmidi->card = card; 98 vmidi->card = card;
99 99
diff --git a/sound/mips/au1x00.c b/sound/mips/au1x00.c
index 1881cec11e78..99e1391b2eb4 100644
--- a/sound/mips/au1x00.c
+++ b/sound/mips/au1x00.c
@@ -636,9 +636,10 @@ au1000_init(void)
636 struct snd_card *card; 636 struct snd_card *card;
637 struct snd_au1000 *au1000; 637 struct snd_au1000 *au1000;
638 638
639 card = snd_card_new(-1, "AC97", THIS_MODULE, sizeof(struct snd_au1000)); 639 err = snd_card_create(-1, "AC97", THIS_MODULE,
640 if (card == NULL) 640 sizeof(struct snd_au1000), &card);
641 return -ENOMEM; 641 if (err < 0)
642 return err;
642 643
643 card->private_free = snd_au1000_free; 644 card->private_free = snd_au1000_free;
644 au1000 = card->private_data; 645 au1000 = card->private_data;
diff --git a/sound/mips/hal2.c b/sound/mips/hal2.c
index db495be01861..c52691c2fc46 100644
--- a/sound/mips/hal2.c
+++ b/sound/mips/hal2.c
@@ -878,9 +878,9 @@ static int __devinit hal2_probe(struct platform_device *pdev)
878 struct snd_hal2 *chip; 878 struct snd_hal2 *chip;
879 int err; 879 int err;
880 880
881 card = snd_card_new(index, id, THIS_MODULE, 0); 881 err = snd_card_create(index, id, THIS_MODULE, 0, &card);
882 if (card == NULL) 882 if (err < 0)
883 return -ENOMEM; 883 return err;
884 884
885 err = hal2_create(card, &chip); 885 err = hal2_create(card, &chip);
886 if (err < 0) { 886 if (err < 0) {
diff --git a/sound/mips/sgio2audio.c b/sound/mips/sgio2audio.c
index 4c63504348dc..66f3b48ceafc 100644
--- a/sound/mips/sgio2audio.c
+++ b/sound/mips/sgio2audio.c
@@ -936,9 +936,9 @@ static int __devinit snd_sgio2audio_probe(struct platform_device *pdev)
936 struct snd_sgio2audio *chip; 936 struct snd_sgio2audio *chip;
937 int err; 937 int err;
938 938
939 card = snd_card_new(index, id, THIS_MODULE, 0); 939 err = snd_card_create(index, id, THIS_MODULE, 0, &card);
940 if (card == NULL) 940 if (err < 0)
941 return -ENOMEM; 941 return err;
942 942
943 err = snd_sgio2audio_create(card, &chip); 943 err = snd_sgio2audio_create(card, &chip);
944 if (err < 0) { 944 if (err < 0) {
diff --git a/sound/parisc/harmony.c b/sound/parisc/harmony.c
index 41f870f8a11d..6055fd6d3b38 100644
--- a/sound/parisc/harmony.c
+++ b/sound/parisc/harmony.c
@@ -975,9 +975,9 @@ snd_harmony_probe(struct parisc_device *padev)
975 struct snd_card *card; 975 struct snd_card *card;
976 struct snd_harmony *h; 976 struct snd_harmony *h;
977 977
978 card = snd_card_new(index, id, THIS_MODULE, 0); 978 err = snd_card_create(index, id, THIS_MODULE, 0, &card);
979 if (card == NULL) 979 if (err < 0)
980 return -ENOMEM; 980 return err;
981 981
982 err = snd_harmony_create(card, padev, &h); 982 err = snd_harmony_create(card, padev, &h);
983 if (err < 0) 983 if (err < 0)
diff --git a/sound/pcmcia/pdaudiocf/pdaudiocf.c b/sound/pcmcia/pdaudiocf/pdaudiocf.c
index 819aaaac432f..183f6615c68c 100644
--- a/sound/pcmcia/pdaudiocf/pdaudiocf.c
+++ b/sound/pcmcia/pdaudiocf/pdaudiocf.c
@@ -91,7 +91,7 @@ static int snd_pdacf_dev_free(struct snd_device *device)
91 */ 91 */
92static int snd_pdacf_probe(struct pcmcia_device *link) 92static int snd_pdacf_probe(struct pcmcia_device *link)
93{ 93{
94 int i; 94 int i, err;
95 struct snd_pdacf *pdacf; 95 struct snd_pdacf *pdacf;
96 struct snd_card *card; 96 struct snd_card *card;
97 static struct snd_device_ops ops = { 97 static struct snd_device_ops ops = {
@@ -112,10 +112,10 @@ static int snd_pdacf_probe(struct pcmcia_device *link)
112 return -ENODEV; /* disabled explicitly */ 112 return -ENODEV; /* disabled explicitly */
113 113
114 /* ok, create a card instance */ 114 /* ok, create a card instance */
115 card = snd_card_new(index[i], id[i], THIS_MODULE, 0); 115 err = snd_card_create(index[i], id[i], THIS_MODULE, 0, &card);
116 if (card == NULL) { 116 if (err < 0) {
117 snd_printk(KERN_ERR "pdacf: cannot create a card instance\n"); 117 snd_printk(KERN_ERR "pdacf: cannot create a card instance\n");
118 return -ENOMEM; 118 return err;
119 } 119 }
120 120
121 pdacf = snd_pdacf_create(card); 121 pdacf = snd_pdacf_create(card);
diff --git a/sound/pcmcia/vx/vxpocket.c b/sound/pcmcia/vx/vxpocket.c
index 706602a40600..087ded8a8d72 100644
--- a/sound/pcmcia/vx/vxpocket.c
+++ b/sound/pcmcia/vx/vxpocket.c
@@ -292,7 +292,7 @@ static int vxpocket_probe(struct pcmcia_device *p_dev)
292{ 292{
293 struct snd_card *card; 293 struct snd_card *card;
294 struct snd_vxpocket *vxp; 294 struct snd_vxpocket *vxp;
295 int i; 295 int i, err;
296 296
297 /* find an empty slot from the card list */ 297 /* find an empty slot from the card list */
298 for (i = 0; i < SNDRV_CARDS; i++) { 298 for (i = 0; i < SNDRV_CARDS; i++) {
@@ -307,10 +307,10 @@ static int vxpocket_probe(struct pcmcia_device *p_dev)
307 return -ENODEV; /* disabled explicitly */ 307 return -ENODEV; /* disabled explicitly */
308 308
309 /* ok, create a card instance */ 309 /* ok, create a card instance */
310 card = snd_card_new(index[i], id[i], THIS_MODULE, 0); 310 err = snd_card_create(index[i], id[i], THIS_MODULE, 0, &card);
311 if (card == NULL) { 311 if (err < 0) {
312 snd_printk(KERN_ERR "vxpocket: cannot create a card instance\n"); 312 snd_printk(KERN_ERR "vxpocket: cannot create a card instance\n");
313 return -ENOMEM; 313 return err;
314 } 314 }
315 315
316 vxp = snd_vxpocket_new(card, ibl[i], p_dev); 316 vxp = snd_vxpocket_new(card, ibl[i], p_dev);
diff --git a/sound/ppc/powermac.c b/sound/ppc/powermac.c
index c936225771ba..2e18ed0ea899 100644
--- a/sound/ppc/powermac.c
+++ b/sound/ppc/powermac.c
@@ -58,9 +58,9 @@ static int __init snd_pmac_probe(struct platform_device *devptr)
58 char *name_ext; 58 char *name_ext;
59 int err; 59 int err;
60 60
61 card = snd_card_new(index, id, THIS_MODULE, 0); 61 err = snd_card_create(index, id, THIS_MODULE, 0, &card);
62 if (card == NULL) 62 if (err < 0)
63 return -ENOMEM; 63 return err;
64 64
65 if ((err = snd_pmac_new(card, &chip)) < 0) 65 if ((err = snd_pmac_new(card, &chip)) < 0)
66 goto __error; 66 goto __error;
diff --git a/sound/ppc/snd_ps3.c b/sound/ppc/snd_ps3.c
index 8f9e3859c37c..ef2c3f417175 100644
--- a/sound/ppc/snd_ps3.c
+++ b/sound/ppc/snd_ps3.c
@@ -969,11 +969,9 @@ static int __init snd_ps3_driver_probe(struct ps3_system_bus_device *dev)
969 } 969 }
970 970
971 /* create card instance */ 971 /* create card instance */
972 the_card.card = snd_card_new(index, id, THIS_MODULE, 0); 972 ret = snd_card_create(index, id, THIS_MODULE, 0, &the_card.card);
973 if (!the_card.card) { 973 if (ret < 0)
974 ret = -ENXIO;
975 goto clean_irq; 974 goto clean_irq;
976 }
977 975
978 strcpy(the_card.card->driver, "PS3"); 976 strcpy(the_card.card->driver, "PS3");
979 strcpy(the_card.card->shortname, "PS3"); 977 strcpy(the_card.card->shortname, "PS3");
diff --git a/sound/sh/aica.c b/sound/sh/aica.c
index 7c920f3e7fe3..f551233c5a08 100644
--- a/sound/sh/aica.c
+++ b/sound/sh/aica.c
@@ -609,11 +609,11 @@ static int __devinit snd_aica_probe(struct platform_device *devptr)
609 dreamcastcard = kmalloc(sizeof(struct snd_card_aica), GFP_KERNEL); 609 dreamcastcard = kmalloc(sizeof(struct snd_card_aica), GFP_KERNEL);
610 if (unlikely(!dreamcastcard)) 610 if (unlikely(!dreamcastcard))
611 return -ENOMEM; 611 return -ENOMEM;
612 dreamcastcard->card = 612 err = snd_card_create(index, SND_AICA_DRIVER, THIS_MODULE, 0,
613 snd_card_new(index, SND_AICA_DRIVER, THIS_MODULE, 0); 613 &dreamcastcard->card);
614 if (unlikely(!dreamcastcard->card)) { 614 if (unlikely(err < 0)) {
615 kfree(dreamcastcard); 615 kfree(dreamcastcard);
616 return -ENODEV; 616 return err;
617 } 617 }
618 strcpy(dreamcastcard->card->driver, "snd_aica"); 618 strcpy(dreamcastcard->card->driver, "snd_aica");
619 strcpy(dreamcastcard->card->shortname, SND_AICA_DRIVER); 619 strcpy(dreamcastcard->card->shortname, SND_AICA_DRIVER);
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 6cbe7e82f238..318dfdd54d7f 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1311,17 +1311,17 @@ int snd_soc_new_pcms(struct snd_soc_device *socdev, int idx, const char *xid)
1311{ 1311{
1312 struct snd_soc_codec *codec = socdev->codec; 1312 struct snd_soc_codec *codec = socdev->codec;
1313 struct snd_soc_card *card = socdev->card; 1313 struct snd_soc_card *card = socdev->card;
1314 int ret = 0, i; 1314 int ret, i;
1315 1315
1316 mutex_lock(&codec->mutex); 1316 mutex_lock(&codec->mutex);
1317 1317
1318 /* register a sound card */ 1318 /* register a sound card */
1319 codec->card = snd_card_new(idx, xid, codec->owner, 0); 1319 ret = snd_card_create(idx, xid, codec->owner, 0, &codec->card);
1320 if (!codec->card) { 1320 if (ret < 0) {
1321 printk(KERN_ERR "asoc: can't create sound card for codec %s\n", 1321 printk(KERN_ERR "asoc: can't create sound card for codec %s\n",
1322 codec->name); 1322 codec->name);
1323 mutex_unlock(&codec->mutex); 1323 mutex_unlock(&codec->mutex);
1324 return -ENODEV; 1324 return ret;
1325 } 1325 }
1326 1326
1327 codec->card->dev = socdev->dev; 1327 codec->card->dev = socdev->dev;
diff --git a/sound/sparc/amd7930.c b/sound/sparc/amd7930.c
index f87933e48812..ba38912614b4 100644
--- a/sound/sparc/amd7930.c
+++ b/sound/sparc/amd7930.c
@@ -1018,9 +1018,10 @@ static int __devinit amd7930_sbus_probe(struct of_device *op, const struct of_de
1018 return -ENOENT; 1018 return -ENOENT;
1019 } 1019 }
1020 1020
1021 card = snd_card_new(index[dev_num], id[dev_num], THIS_MODULE, 0); 1021 err = snd_card_create(index[dev_num], id[dev_num], THIS_MODULE, 0,
1022 if (card == NULL) 1022 &card);
1023 return -ENOMEM; 1023 if (err < 0)
1024 return err;
1024 1025
1025 strcpy(card->driver, "AMD7930"); 1026 strcpy(card->driver, "AMD7930");
1026 strcpy(card->shortname, "Sun AMD7930"); 1027 strcpy(card->shortname, "Sun AMD7930");
diff --git a/sound/sparc/cs4231.c b/sound/sparc/cs4231.c
index 41c387587474..7d93fa705ccf 100644
--- a/sound/sparc/cs4231.c
+++ b/sound/sparc/cs4231.c
@@ -1563,6 +1563,7 @@ static int __init cs4231_attach_begin(struct snd_card **rcard)
1563{ 1563{
1564 struct snd_card *card; 1564 struct snd_card *card;
1565 struct snd_cs4231 *chip; 1565 struct snd_cs4231 *chip;
1566 int err;
1566 1567
1567 *rcard = NULL; 1568 *rcard = NULL;
1568 1569
@@ -1574,10 +1575,10 @@ static int __init cs4231_attach_begin(struct snd_card **rcard)
1574 return -ENOENT; 1575 return -ENOENT;
1575 } 1576 }
1576 1577
1577 card = snd_card_new(index[dev], id[dev], THIS_MODULE, 1578 err = snd_card_create(index[dev], id[dev], THIS_MODULE,
1578 sizeof(struct snd_cs4231)); 1579 sizeof(struct snd_cs4231), &card);
1579 if (card == NULL) 1580 if (err < 0)
1580 return -ENOMEM; 1581 return err;
1581 1582
1582 strcpy(card->driver, "CS4231"); 1583 strcpy(card->driver, "CS4231");
1583 strcpy(card->shortname, "Sun CS4231"); 1584 strcpy(card->shortname, "Sun CS4231");
diff --git a/sound/sparc/dbri.c b/sound/sparc/dbri.c
index 23ed6f04a718..af95ff1e126c 100644
--- a/sound/sparc/dbri.c
+++ b/sound/sparc/dbri.c
@@ -2612,10 +2612,10 @@ static int __devinit dbri_probe(struct of_device *op, const struct of_device_id
2612 return -ENODEV; 2612 return -ENODEV;
2613 } 2613 }
2614 2614
2615 card = snd_card_new(index[dev], id[dev], THIS_MODULE, 2615 err = snd_card_create(index[dev], id[dev], THIS_MODULE,
2616 sizeof(struct snd_dbri)); 2616 sizeof(struct snd_dbri), &card);
2617 if (card == NULL) 2617 if (err < 0)
2618 return -ENOMEM; 2618 return err;
2619 2619
2620 strcpy(card->driver, "DBRI"); 2620 strcpy(card->driver, "DBRI");
2621 strcpy(card->shortname, "Sun DBRI"); 2621 strcpy(card->shortname, "Sun DBRI");
diff --git a/sound/spi/at73c213.c b/sound/spi/at73c213.c
index 09802e8a6fb8..4c7b051f9d17 100644
--- a/sound/spi/at73c213.c
+++ b/sound/spi/at73c213.c
@@ -965,12 +965,11 @@ static int __devinit snd_at73c213_probe(struct spi_device *spi)
965 return PTR_ERR(board->dac_clk); 965 return PTR_ERR(board->dac_clk);
966 } 966 }
967 967
968 retval = -ENOMEM;
969
970 /* Allocate "card" using some unused identifiers. */ 968 /* Allocate "card" using some unused identifiers. */
971 snprintf(id, sizeof id, "at73c213_%d", board->ssc_id); 969 snprintf(id, sizeof id, "at73c213_%d", board->ssc_id);
972 card = snd_card_new(-1, id, THIS_MODULE, sizeof(struct snd_at73c213)); 970 retval = snd_card_create(-1, id, THIS_MODULE,
973 if (!card) 971 sizeof(struct snd_at73c213), &card);
972 if (retval < 0)
974 goto out; 973 goto out;
975 974
976 chip = card->private_data; 975 chip = card->private_data;
diff --git a/sound/usb/caiaq/caiaq-device.c b/sound/usb/caiaq/caiaq-device.c
index a62500e387a6..63a2c1d5779b 100644
--- a/sound/usb/caiaq/caiaq-device.c
+++ b/sound/usb/caiaq/caiaq-device.c
@@ -339,6 +339,7 @@ static void __devinit setup_card(struct snd_usb_caiaqdev *dev)
339static struct snd_card* create_card(struct usb_device* usb_dev) 339static struct snd_card* create_card(struct usb_device* usb_dev)
340{ 340{
341 int devnum; 341 int devnum;
342 int err;
342 struct snd_card *card; 343 struct snd_card *card;
343 struct snd_usb_caiaqdev *dev; 344 struct snd_usb_caiaqdev *dev;
344 345
@@ -349,9 +350,9 @@ static struct snd_card* create_card(struct usb_device* usb_dev)
349 if (devnum >= SNDRV_CARDS) 350 if (devnum >= SNDRV_CARDS)
350 return NULL; 351 return NULL;
351 352
352 card = snd_card_new(index[devnum], id[devnum], THIS_MODULE, 353 err = snd_card_create(index[devnum], id[devnum], THIS_MODULE,
353 sizeof(struct snd_usb_caiaqdev)); 354 sizeof(struct snd_usb_caiaqdev), &card);
354 if (!card) 355 if (err < 0)
355 return NULL; 356 return NULL;
356 357
357 dev = caiaqdev(card); 358 dev = caiaqdev(card);
diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c
index c709b9563226..eec32e1a3020 100644
--- a/sound/usb/usbaudio.c
+++ b/sound/usb/usbaudio.c
@@ -3463,10 +3463,10 @@ static int snd_usb_audio_create(struct usb_device *dev, int idx,
3463 return -ENXIO; 3463 return -ENXIO;
3464 } 3464 }
3465 3465
3466 card = snd_card_new(index[idx], id[idx], THIS_MODULE, 0); 3466 err = snd_card_create(index[idx], id[idx], THIS_MODULE, 0, &card);
3467 if (card == NULL) { 3467 if (err < 0) {
3468 snd_printk(KERN_ERR "cannot create card instance %d\n", idx); 3468 snd_printk(KERN_ERR "cannot create card instance %d\n", idx);
3469 return -ENOMEM; 3469 return err;
3470 } 3470 }
3471 3471
3472 chip = kzalloc(sizeof(*chip), GFP_KERNEL); 3472 chip = kzalloc(sizeof(*chip), GFP_KERNEL);
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;