--- a/driver/Makefile +++ b/driver/Makefile @@ -33,6 +33,9 @@ ifeq (,$(wildcard $(VERSION_H))) VERSION_H := $(KBUILD)/include/linux/version.h endif ifeq (,$(wildcard $(VERSION_H))) +VERSION_H := $(KBUILD)/include/generated/uapi/linux/version.h +endif +ifeq (,$(wildcard $(VERSION_H))) $(error Cannot find kernel version in $(KBUILD), is it configured?) endif @@ -157,7 +160,7 @@ $(MODNAME)-objs := $(OBJS) config_check: - @if [ ! -f $(KBUILD)/include/linux/version.h ]; then \ + @if [ ! -f $(KBUILD)/include/linux/version.h ] && [ ! -f $(KBUILD)/include/generated/uapi/linux/version.h ]; then \ echo; echo; \ echo "Cannot find kernel build files in $(KBUILD)"; \ echo "Please give the path to kernel build directory with" ; \ --- a/driver/ntoskernel.h +++ b/driver/ntoskernel.h @@ -204,19 +204,6 @@ int wrap_queue_work(struct workqueue_str void wrap_cancel_work(struct work_struct *work); void wrap_flush_wq(struct workqueue_struct *workq); -#else // WRAP_WQ - -/* Compatibility for Linux before 2.6.20 where INIT_WORK takes 3 arguments */ -#if !defined(INIT_WORK_NAR) && !defined(INIT_DELAYED_WORK_DEFERRABLE) -typedef void (*compat_work_func_t)(void *work); -typedef void (*work_func_t)(struct work_struct *work); -static inline void (INIT_WORK)(struct work_struct *work, work_func_t func) -{ - INIT_WORK(work, (compat_work_func_t)func, work); -} -#undef INIT_WORK -#endif - #endif // WRAP_WQ #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,18)