Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
[safe/jmp/linux-2.6] / sound / pci / ad1889.c
index a7f38e6..4382d0f 100644 (file)
@@ -909,8 +909,8 @@ snd_ad1889_create(struct snd_card *card,
                return err;
 
        /* check PCI availability (32bit DMA) */
-       if (pci_set_dma_mask(pci, DMA_32BIT_MASK) < 0 ||
-           pci_set_consistent_dma_mask(pci, DMA_32BIT_MASK) < 0) {
+       if (pci_set_dma_mask(pci, DMA_BIT_MASK(32)) < 0 ||
+           pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(32)) < 0) {
                printk(KERN_ERR PFX "error setting 32-bit DMA mask.\n");
                pci_disable_device(pci);
                return -ENXIO;
@@ -995,10 +995,10 @@ snd_ad1889_probe(struct pci_dev *pci,
        }
 
        /* (2) */
-       card = snd_card_new(index[devno], id[devno], THIS_MODULE, 0);
+       err = snd_card_create(index[devno], id[devno], THIS_MODULE, 0, &card);
        /* XXX REVISIT: we can probably allocate chip in this call */
-       if (card == NULL)
-               return -ENOMEM;
+       if (err < 0)
+               return err;
 
        strcpy(card->driver, "AD1889");
        strcpy(card->shortname, "Analog Devices AD1889");
@@ -1048,7 +1048,7 @@ snd_ad1889_remove(struct pci_dev *pci)
        pci_set_drvdata(pci, NULL);
 }
 
-static struct pci_device_id snd_ad1889_ids[] = {
+static DEFINE_PCI_DEVICE_TABLE(snd_ad1889_ids) = {
        { PCI_DEVICE(PCI_VENDOR_ID_ANALOG_DEVICES, PCI_DEVICE_ID_AD1889JS) },
        { 0, },
 };