]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/staging/go7007/snd-go7007.c
Merge branch 'header-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6-omap-h63xx.git] / drivers / staging / go7007 / snd-go7007.c
index 382740c405ffe788704ca1aa5e95a33bcdd47ed3..cd19be6c00e09fa1f0256c3657f81989f1f1e4fe 100644 (file)
@@ -17,7 +17,6 @@
 
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <linux/version.h>
 #include <linux/moduleparam.h>
 #include <linux/init.h>
 #include <linux/spinlock.h>
@@ -249,10 +248,11 @@ int go7007_snd_init(struct go7007 *go)
        spin_lock_init(&gosnd->lock);
        gosnd->hw_ptr = gosnd->w_idx = gosnd->avail = 0;
        gosnd->capturing = 0;
-       gosnd->card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0);
-       if (gosnd->card == NULL) {
+       ret = snd_card_create(index[dev], id[dev], THIS_MODULE, 0,
+                             &gosnd->card);
+       if (ret < 0) {
                kfree(gosnd);
-               return -ENOMEM;
+               return ret;
        }
        ret = snd_device_new(gosnd->card, SNDRV_DEV_LOWLEVEL, go,
                        &go7007_snd_device_ops);