nfsd4: fix bare destroy_session null dereference
[safe/jmp/linux-2.6] / sound / sparc / dbri.c
index 23ed6f0..2eab6ce 100644 (file)
@@ -58,6 +58,7 @@
 #include <linux/irq.h>
 #include <linux/io.h>
 #include <linux/dma-mapping.h>
+#include <linux/gfp.h>
 
 #include <sound/core.h>
 #include <sound/pcm.h>
@@ -1975,7 +1976,8 @@ static struct snd_pcm_hardware snd_dbri_pcm_hw = {
        .info           = SNDRV_PCM_INFO_MMAP |
                          SNDRV_PCM_INFO_INTERLEAVED |
                          SNDRV_PCM_INFO_BLOCK_TRANSFER |
-                         SNDRV_PCM_INFO_MMAP_VALID,
+                         SNDRV_PCM_INFO_MMAP_VALID |
+                         SNDRV_PCM_INFO_BATCH,
        .formats        = SNDRV_PCM_FMTBIT_MU_LAW |
                          SNDRV_PCM_FMTBIT_A_LAW |
                          SNDRV_PCM_FMTBIT_U8 |
@@ -2612,10 +2614,10 @@ static int __devinit dbri_probe(struct of_device *op, const struct of_device_id
                return -ENODEV;
        }
 
-       card = snd_card_new(index[dev], id[dev], THIS_MODULE,
-                           sizeof(struct snd_dbri));
-       if (card == NULL)
-               return -ENOMEM;
+       err = snd_card_create(index[dev], id[dev], THIS_MODULE,
+                             sizeof(struct snd_dbri), &card);
+       if (err < 0)
+               return err;
 
        strcpy(card->driver, "DBRI");
        strcpy(card->shortname, "Sun DBRI");