X-Git-Url: http://ftp.safe.ca/?a=blobdiff_plain;f=sound%2Fpci%2Fsonicvibes.c;h=337b9facadfdb4f1afc9061f857cf78c37c8703c;hb=d472d1a1c82ade81d2854db2ff4c9694ed66612e;hp=e922b1887b1d67cccacaabd356d18f271970921c;hpb=ee419653a38de93b75a577851d9e4003cf0bbe07;p=safe%2Fjmp%2Flinux-2.6 diff --git a/sound/pci/sonicvibes.c b/sound/pci/sonicvibes.c index e922b18..337b9fa 100644 --- a/sound/pci/sonicvibes.c +++ b/sound/pci/sonicvibes.c @@ -242,8 +242,8 @@ struct sonicvibes { #endif }; -static struct pci_device_id snd_sonic_ids[] = { - { 0x5333, 0xca00, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, +static DEFINE_PCI_DEVICE_TABLE(snd_sonic_ids) = { + { PCI_VDEVICE(S3, 0xca00), 0, }, { 0, } }; @@ -1264,8 +1264,8 @@ static int __devinit snd_sonicvibes_create(struct snd_card *card, if ((err = pci_enable_device(pci)) < 0) return err; /* check, if we can restrict PCI DMA transfers to 24 bits */ - if (pci_set_dma_mask(pci, DMA_24BIT_MASK) < 0 || - pci_set_consistent_dma_mask(pci, DMA_24BIT_MASK) < 0) { + if (pci_set_dma_mask(pci, DMA_BIT_MASK(24)) < 0 || + pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(24)) < 0) { snd_printk(KERN_ERR "architecture does not support 24bit PCI busmaster DMA\n"); pci_disable_device(pci); return -ENXIO; @@ -1458,9 +1458,9 @@ static int __devinit snd_sonic_probe(struct pci_dev *pci, return -ENOENT; } - card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0); - if (card == NULL) - return -ENOMEM; + err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card); + if (err < 0) + return err; for (idx = 0; idx < 5; idx++) { if (pci_resource_start(pci, idx) == 0 || !(pci_resource_flags(pci, idx) & IORESOURCE_IO)) {