Ignore:
Timestamp:
May 9, 2009, 11:45:26 AM (16 years ago)
Author:
Paul Smedley
Message:

Update alsa-kernel to ALSA 1.0.20 level

File:
1 edited

Legend:

Unmodified
Added
Removed
  • GPL/trunk/alsa-kernel/include/sound/config.h

    r410 r426  
    422422#endif
    423423
     424typedef unsigned __nocast gfp_t;
     425
    424426#ifndef CONFIG_HAVE_KZALLOC
    425 void *snd_compat_kzalloc(size_t n, unsigned int __nocast gfp_flags);
     427void *snd_compat_kzalloc(size_t n, gfp_t gfp_flags);
    426428#define kzalloc(s,f) snd_compat_kzalloc(s,f)
     429
    427430#endif
    428431
     
    655658#endif
    656659
     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>
     668static 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
    657688#endif //__ALSA_CONFIG_H__
Note: See TracChangeset for help on using the changeset viewer.