/[openvortex]/alsa/acore/misc.c
ViewVC logotype

Diff of /alsa/acore/misc.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, Mon Aug 11 00:06:37 2003 UTC
# Line 2  Line 2 
2  #include "../alsa-kernel/core/misc.c"  #include "../alsa-kernel/core/misc.c"
3  #include <linux/smp_lock.h>  #include <linux/smp_lock.h>
4  #include <linux/vmalloc.h>  #include <linux/vmalloc.h>
5    #include <linux/slab.h>
6    
7    
8  #if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0)  #if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0)
# Line 71  static int pci_compat_pm_callback(struct Line 72  static int pci_compat_pm_callback(struct
72                  pci_for_each_dev(dev) {                  pci_for_each_dev(dev) {
73                          struct pci_driver *drv = snd_pci_compat_get_pci_driver(dev);                          struct pci_driver *drv = snd_pci_compat_get_pci_driver(dev);
74                          if (drv && drv->suspend)                          if (drv && drv->suspend)
75                                  drv->suspend(dev);                                  drv->suspend(dev, 0);
76                  }                  }
77                  break;                  break;
78          case PM_RESUME:          case PM_RESUME:
# Line 217  static int work_caller(void *data) Line 218  static int work_caller(void *data)
218  #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0) && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 8)  #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0) && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 8)
219          reparent_to_init();          reparent_to_init();
220  #endif  #endif
221          strcpy(current->comm, "snd-free"); /* FIXME: different names? */          strcpy(current->comm, "snd"); /* FIXME: different names? */
222    
223          works->func(works->data);          works->func(works->data);
224    
225  #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0)  #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0)
226          unlock_kernel();          unlock_kernel();
227  #endif  #endif
         kfree(works);  
228    
229          return 0;          return 0;
230  }  }
231    
232  int snd_compat_schedule_work(struct work_struct *works)  int snd_compat_schedule_work(struct work_struct *works)
233  {  {
234          struct work_struct *wp = kmalloc(sizeof(*wp), GFP_KERNEL);          return kernel_thread(work_caller, works, 0) >= 0;
         if (! wp)  
                 return 0;  
         *wp = *works;  
         return kernel_thread(work_caller, wp, 0) >= 0;  
235  }  }
236    
237  #endif  #endif

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