1 ////////////////////////////////////////////////////////////////////////////////////
9 // COMPANY NAME: Samsung Research Center in Moscow
10 // DEPT NAME: Advanced Software Group
11 // CREATED: 2008.02.15
13 // REVISION DATE: 2008.12.03
15 ////////////////////////////////////////////////////////////////////////////////////
18 Support for legacy Linux kernel versions
20 #if !defined(__LEGACY_H__)
24 #include <linux/version.h>
26 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 14)
27 extern signed long schedule_timeout_interruptible (signed long timeout);
28 #endif /* kernel without schedule_timeout_interruptible */
30 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 18)
31 extern int remap_vmalloc_range (struct vm_area_struct *vma, void *addr, unsigned long pgoff);
32 #endif /* kernel without remap_vmalloc_range() */
34 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 18)
35 extern void *vmalloc_user (unsigned long size);
36 extern void vfree_user (void *address, unsigned long size);
37 #define VFREE_USER(address, size) \
39 if(address != NULL) { \
40 vfree_user(address, size); \
45 #define VFREE_USER(address, size) \
47 if(address != NULL) { \
52 #endif /* kernel without vmalloc_user() */
54 #endif /* !defined(__LEGACY_H__) */