Changeset 426 for GPL/trunk/alsa-kernel/include/sound/config.h
- Timestamp:
- May 9, 2009, 11:45:26 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GPL/trunk/alsa-kernel/include/sound/config.h
r410 r426 422 422 #endif 423 423 424 typedef unsigned __nocast gfp_t; 425 424 426 #ifndef CONFIG_HAVE_KZALLOC 425 void *snd_compat_kzalloc(size_t n, unsigned int __nocast gfp_flags);427 void *snd_compat_kzalloc(size_t n, gfp_t gfp_flags); 426 428 #define kzalloc(s,f) snd_compat_kzalloc(s,f) 429 427 430 #endif 428 431 … … 655 658 #endif 656 659 660 #ifndef DMA_BIT_MASK 661 #define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1)) 662 #endif 663 664 /* memdup_user() wrapper */ 665 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 30) 666 #include <linux/err.h> 667 #include <asm/uaccess.h> 668 static inline void *memdup_user(void __user *src, size_t len) 669 { 670 void *p = kmalloc(len, GFP_KERNEL); 671 if (!p) 672 return ERR_PTR(-ENOMEM); 673 if (copy_from_user(p, src, len)) { 674 kfree(p); 675 return ERR_PTR(-EFAULT); 676 } 677 return p; 678 } 679 #endif 680 681 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 6) 682 #include <linux/workqueue.h> 683 #ifndef create_singlethread_workqueue 684 #define create_singlethread_workqueue(name) create_workqueue(name) 685 #endif 686 #endif 687 657 688 #endif //__ALSA_CONFIG_H__
Note:
See TracChangeset
for help on using the changeset viewer.