]> err.no Git - linux-2.6/blobdiff - sound/core/pcm_memory.c
Merge branch 'upstream'
[linux-2.6] / sound / core / pcm_memory.c
index f1d5f7a6ee0c69b4e6131af5c10060a7d68e8590..b3f5344f60bef92f440eef1a3e88ff167bd488ba 100644 (file)
@@ -204,6 +204,7 @@ static int snd_pcm_lib_preallocate_pages1(snd_pcm_substream_t *substream,
                entry->c.text.read = snd_pcm_lib_preallocate_proc_read;
                entry->c.text.write_size = 64;
                entry->c.text.write = snd_pcm_lib_preallocate_proc_write;
+               entry->mode |= S_IWUSR;
                entry->private_data = substream;
                if (snd_info_register(entry) < 0) {
                        snd_info_free_entry(entry);
@@ -243,7 +244,7 @@ int snd_pcm_lib_preallocate_pages(snd_pcm_substream_t *substream,
 
 /**
  * snd_pcm_lib_preallocate_pages_for_all - pre-allocation for continous memory type (all substreams)
- * @substream: the pcm substream instance
+ * @pcm: the pcm instance
  * @type: DMA type (SNDRV_DMA_TYPE_*)
  * @data: DMA type dependant data
  * @size: the requested pre-allocation size in bytes
@@ -320,7 +321,7 @@ int snd_pcm_lib_malloc_pages(snd_pcm_substream_t *substream, size_t size)
        if (substream->dma_buffer.area != NULL && substream->dma_buffer.bytes >= size) {
                dmab = &substream->dma_buffer; /* use the pre-allocated buffer */
        } else {
-               dmab = kcalloc(1, sizeof(*dmab), GFP_KERNEL);
+               dmab = kzalloc(sizeof(*dmab), GFP_KERNEL);
                if (! dmab)
                        return -ENOMEM;
                dmab->dev = substream->dma_buffer.dev;