Merge branch 'topic/pcxhr' into for-linus
[safe/jmp/linux-2.6] / sound / pci / als300.c
index 8afcb98..009b4c8 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>
 #define PLAYBACK_BLOCK_COUNTER 0x9A
 #define RECORD_BLOCK_COUNTER   0x9B
 
-#define DEBUG_CALLS    1
-#define DEBUG_PLAY_REC 1
+#define DEBUG_CALLS    0
+#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()
@@ -733,7 +732,8 @@ static int __devinit snd_als300_create(struct snd_card *card,
 
        snd_als300_init(chip);
 
-       if (snd_als300_ac97(chip) < 0) {
+       err = snd_als300_ac97(chip);
+       if (err < 0) {
                snd_printk(KERN_WARNING "Could not create ac97\n");
                snd_als300_free(chip);
                return err;
@@ -812,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;