/[openvortex]/alsa/alsa-kernel/core/memalloc.c
ViewVC logotype

Diff of /alsa/alsa-kernel/core/memalloc.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by vizard, Sat May 31 02:35:09 2003 UTC revision 1.3 by vizard, Sun Jun 15 21:01:30 2003 UTC
# Line 80  struct snd_mem_list { Line 80  struct snd_mem_list {
80  #define snd_assert(expr, args...) /**/  #define snd_assert(expr, args...) /**/
81  #endif  #endif
82    
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 0)  
83  #ifdef CONFIG_PCI  #ifdef CONFIG_PCI
84  #if defined(__i386__) || defined(__ppc__) || defined(__x86_64__)  #if defined(__i386__) || defined(__ppc__) || defined(__x86_64__)
85  #define HACK_PCI_ALLOC_CONSISTENT  #define HACK_PCI_ALLOC_CONSISTENT
# Line 133  static void *snd_pci_hack_alloc_consiste Line 132  static void *snd_pci_hack_alloc_consiste
132    
133  #endif /* arch */  #endif /* arch */
134  #endif /* CONFIG_PCI */  #endif /* CONFIG_PCI */
 #endif /* LINUX >= 2.4.0 */  
135    
136    
137  /*  /*
# Line 261  void snd_dma_free_pages(const struct snd Line 259  void snd_dma_free_pages(const struct snd
259  /*  /*
260   * search for the device   * search for the device
261   */   */
262  static struct snd_mem_list *mem_list_find(const struct snd_dma_device *dev, int allow_unused)  static struct snd_mem_list *mem_list_find(const struct snd_dma_device *dev, int search_empty)
263  {  {
264          struct list_head *p;          struct list_head *p;
265          struct snd_mem_list *mem;          struct snd_mem_list *mem;
266    
267          list_for_each(p, &mem_list_head) {          list_for_each(p, &mem_list_head) {
268                  mem = list_entry(p, struct snd_mem_list, list);                  mem = list_entry(p, struct snd_mem_list, list);
269                  if (compare_device(&mem->dev, dev, allow_unused))                  if (mem->used && search_empty)
270                            continue;
271                    if (compare_device(&mem->dev, dev, search_empty))
272                          return mem;                          return mem;
273          }          }
274          return NULL;          return NULL;
# Line 623  void snd_free_pci_pages(struct pci_dev * Line 623  void snd_free_pci_pages(struct pci_dev *
623  }  }
624    
625    
626  #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 0) && defined(__i386__)  #if defined(__i386__)
627  /*  /*
628   * on ix86, we allocate a page with GFP_KERNEL to assure the   * on ix86, we allocate a page with GFP_KERNEL to assure the
629   * allocation.  the code is almost same with kernel/i386/pci-dma.c but   * allocation.  the code is almost same with kernel/i386/pci-dma.c but

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26