mmc: s3c6410: enable ADMA feature in 6410 sdhci controller
[safe/jmp/linux-2.6] / sound / pci / als300.c
index 48cc39b..d7653cb 100644 (file)
@@ -30,7 +30,6 @@
  *  to keep track of what period we are in.
  */
 
-#include <sound/driver.h>
 #include <linux/delay.h>
 #include <linux/init.h>
 #include <linux/moduleparam.h>
@@ -92,9 +91,9 @@
 #define DEBUG_PLAY_REC 0
 
 #if DEBUG_CALLS
-#define snd_als300_dbgcalls(format, args...) printk(format, ##args)
-#define snd_als300_dbgcallenter() printk(KERN_ERR "--> %s\n", __FUNCTION__)
-#define snd_als300_dbgcallleave() printk(KERN_ERR "<-- %s\n", __FUNCTION__)
+#define snd_als300_dbgcalls(format, args...) printk(KERN_DEBUG format, ##args)
+#define snd_als300_dbgcallenter() printk(KERN_ERR "--> %s\n", __func__)
+#define snd_als300_dbgcallleave() printk(KERN_ERR "<-- %s\n", __func__)
 #else
 #define snd_als300_dbgcalls(format, args...)
 #define snd_als300_dbgcallenter()
@@ -146,7 +145,7 @@ struct snd_als300_substream_data {
        int block_counter_register;
 };
 
-static struct pci_device_id snd_als300_ids[] = {
+static DEFINE_PCI_DEVICE_TABLE(snd_als300_ids) = {
        { 0x4005, 0x0300, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_ALS300 },
        { 0x4005, 0x0308, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_ALS300_PLUS },
        { 0, }
@@ -690,8 +689,8 @@ static int __devinit snd_als300_create(struct snd_card *card,
        if ((err = pci_enable_device(pci)) < 0)
                return err;
 
-       if (pci_set_dma_mask(pci, DMA_28BIT_MASK) < 0 ||
-               pci_set_consistent_dma_mask(pci, DMA_28BIT_MASK) < 0) {
+       if (pci_set_dma_mask(pci, DMA_BIT_MASK(28)) < 0 ||
+               pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(28)) < 0) {
                printk(KERN_ERR "error setting 28bit DMA mask\n");
                pci_disable_device(pci);
                return -ENXIO;
@@ -813,10 +812,10 @@ static int __devinit snd_als300_probe(struct pci_dev *pci,
                return -ENOENT;
        }
 
-       card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0);
+       err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
 
-       if (card == NULL)
-               return -ENOMEM;
+       if (err < 0)
+               return err;
 
        chip_type = pci_id->driver_data;