Update compat.h

This commit is contained in:
CrazyCat
2023-09-24 17:43:27 +03:00
parent f03e9524ca
commit d685613366
2 changed files with 0 additions and 15 deletions

View File

@@ -661,20 +661,6 @@ static inline int usb_urb_ep_type_check(void *urb)
}
#endif
/* prototype of get_user_pages changed in Kernel 4.9. For older Kernels
* this will not compile */
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
#ifdef NEED_GET_USER_PAGES_LONGTERM
#include <linux/mm.h>
static inline long get_user_pages_longterm(unsigned long start,
unsigned long nr_pages, unsigned int gup_flags,
struct page **pages, struct vm_area_struct **vmas)
{
return get_user_pages(start, nr_pages, gup_flags, pages, vmas);
}
#endif
#endif
#ifdef NEED_PCI_EXP_DEVCTL2_COMP_TIMEOUT
#define PCI_EXP_DEVCTL2_COMP_TIMEOUT 0x000f
#endif

View File

@@ -97,7 +97,6 @@ sub check_other_dependencies()
check_files_for_func("time64_to_tm", "NEED_TIME64_TO_TM", "include/linux/time.h");
check_files_for_func("READ_ONCE", "NEED_READ_ONCE", "include/linux/compiler.h", "include/asm-generic/rwonce.h");
check_files_for_func("usb_urb_ep_type_check", "NEED_USB_EP_CHECK", "include/linux/usb.h");
check_files_for_func("get_user_pages_longterm", "NEED_GET_USER_PAGES_LONGTERM", "include/linux/mm.h");
check_files_for_func("__pfn_to_phys", "NEED_PFN_TO_PHYS", "include/asm-generic/memory_model.h");
check_files_for_func("next_pseudo_random32", "NEED_NEXT_PSEUDO_RANDOM32", "include/linux/random.h", "include/linux/prandom.h");
check_files_for_func("memdup_user_nul", "NEED_MEMDUP_USER_NUL", "include/linux/string.h");