diff options
author | Takashi Iwai <tiwai@suse.de> | 2009-03-23 19:35:35 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-03-23 19:35:35 -0400 |
commit | dec14f8c0eff54549e5747f8a4d1dc6c0347e2dd (patch) | |
tree | af1744c17c4bacad4c9524ad096d5a65f6c25c73 /sound/drivers | |
parent | 8e0ee43bc2c3e19db56a4adaa9a9b04ce885cd84 (diff) | |
parent | b1a0aac05f044e78a589bfd7a9e2334aa640eb45 (diff) |
Merge branch 'topic/snd_card_new-err' into for-linus
Diffstat (limited to 'sound/drivers')
-rw-r--r-- | sound/drivers/dummy.c | 8 | ||||
-rw-r--r-- | sound/drivers/ml403-ac97cr.c | 6 | ||||
-rw-r--r-- | sound/drivers/mpu401/mpu401.c | 6 | ||||
-rw-r--r-- | sound/drivers/mtpav.c | 6 | ||||
-rw-r--r-- | sound/drivers/mts64.c | 6 | ||||
-rw-r--r-- | sound/drivers/pcsp/pcsp.c | 6 | ||||
-rw-r--r-- | sound/drivers/portman2x4.c | 6 | ||||
-rw-r--r-- | sound/drivers/serial-u16550.c | 6 | ||||
-rw-r--r-- | sound/drivers/virmidi.c | 8 |
9 files changed, 29 insertions, 29 deletions
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 48b64e6b2670..0e17d2b5ce19 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 | ||