Merge branch 'topic/snd_card_new-err' into topic/cs423x-merge
[linux-2.6.git] / sound / isa / sc6000.c
index 2f89ecb..7820106 100644 (file)
@@ -29,7 +29,7 @@
 #include <linux/io.h>
 #include <asm/dma.h>
 #include <sound/core.h>
-#include <sound/ad1848.h>
+#include <sound/wss.h>
 #include <sound/opl3.h>
 #include <sound/mpu401.h>
 #include <sound/control.h>
@@ -489,9 +489,9 @@ static int __devinit snd_sc6000_probe(struct device *devptr, unsigned int dev)
        char __iomem *vmss_port;
 
 
-       card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0);
-       if (!card)
-               return -ENOMEM;
+       err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
+       if (err < 0)
+               return err;
 
        if (xirq == SNDRV_AUTO_IRQ) {
                xirq = snd_legacy_find_free_irq(possible_irqs);
@@ -548,8 +548,8 @@ static int __devinit snd_sc6000_probe(struct device *devptr, unsigned int dev)
        if (err < 0)
                goto err_unmap2;
 
-       err = snd_ad1848_create(card, mss_port[dev] + 4, xirq, xdma,
-                               WSS_HW_DETECT, &chip);
+       err = snd_wss_create(card, mss_port[dev] + 4,  -1, xirq, xdma, -1,
+                            WSS_HW_DETECT, 0, &chip);
        if (err < 0)
                goto err_unmap2;
        card->private_data = chip;
@@ -576,10 +576,6 @@ static int __devinit snd_sc6000_probe(struct device *devptr, unsigned int dev)
                snd_printk(KERN_ERR PFX "no OPL device at 0x%x-0x%x ?\n",
                           0x388, 0x388 + 2);
        } else {
-               err = snd_opl3_timer_new(opl3, 0, 1);
-               if (err < 0)
-                       goto err_unmap2;
-
                err = snd_opl3_hwdep_new(opl3, 0, 1, NULL);
                if (err < 0)
                        goto err_unmap2;