]> err.no Git - linux-2.6/blobdiff - sound/core/memalloc.c
[ALSA] Fix compilation without CONFIG_PROC_FS
[linux-2.6] / sound / core / memalloc.c
index dbc23e35fa065decbbeb4910f39d0153073f0c36..39a54a415528080a01620e71d7a40efdcbac1e66 100644 (file)
@@ -105,7 +105,8 @@ struct snd_mem_list {
  */
 
 static void *snd_dma_hack_alloc_coherent(struct device *dev, size_t size,
-                                        dma_addr_t *dma_handle, int flags)
+                                        dma_addr_t *dma_handle,
+                                        unsigned int __nocast flags)
 {
        void *ret;
        u64 dma_mask, coherent_dma_mask;
@@ -511,7 +512,7 @@ static void free_all_reserved_pages(void)
  * proc file interface
  */
 #define SND_MEM_PROC_FILE      "driver/snd-page-alloc"
-struct proc_dir_entry *snd_mem_proc;
+static struct proc_dir_entry *snd_mem_proc;
 
 static int snd_mem_proc_read(char *page, char **start, off_t off,
                             int count, int *eof, void *data)
@@ -654,8 +655,7 @@ static int __init snd_mem_init(void)
 
 static void __exit snd_mem_exit(void)
 {
-       if (snd_mem_proc)
-               remove_proc_entry(SND_MEM_PROC_FILE, NULL);
+       remove_proc_entry(SND_MEM_PROC_FILE, NULL);
        free_all_reserved_pages();
        if (snd_allocated_pages > 0)
                printk(KERN_ERR "snd-malloc: Memory leak?  pages not freed = %li\n", snd_allocated_pages);