1
0
mirror of https://github.com/KastnerRG/riffa.git synced 2024-12-24 22:58:54 +08:00

Fix compilation of Linux driver (#64)

* Fix typo in #elif

* Fix Makefile to compile the Linux kernel module
This commit is contained in:
Adrien Prost-Boucle 2024-06-11 16:10:01 +02:00 committed by GitHub
parent c2e5b280b4
commit 326c7105ca
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -98,7 +98,7 @@ $(NAME).ko: *.c *.h
sed -i 's/#define VENDOR_ID1 [^\n]*/#define VENDOR_ID1 0x$(VENDOR_ID1)/g' $(DRVR_HDR)
sed -i 's/#define DEBUG [^\n]*/#define DBUG 1/g' $(DRVR_HDR)
sed -i 's/#define DBUG [^\n]*/#define $(DBUGVAL) 1/g' $(DRVR_HDR)
make -C $(KDIR) SUBDIRS=`pwd` modules
make -C $(KDIR) M=$(shell pwd) modules
rm -rf $(LIB_OBJS)
$(NAME).so.$(LIB_VER): $(LIB_OBJS)

View File

@ -463,7 +463,7 @@ static inline struct sg_mapping * fill_sg_buf(struct fpga_state * sc, int chnl,
num_pages = get_user_pages(current, current->mm, udata, num_pages_reqd, 1, 0, pages, NULL);
#elif LINUX_VERSION_CODE < KERNEL_VERSION(4,9,0)
num_pages = get_user_pages(udata, num_pages_reqd, 1, 0, pages, NULL);
#elsif LINUX_VERSION_CODE < KERNEL_VERSION(6,5,0)
#elif LINUX_VERSION_CODE < KERNEL_VERSION(6,5,0)
num_pages = get_user_pages(udata, num_pages_reqd, FOLL_WRITE, pages, NULL);
#else
num_pages = get_user_pages(udata, num_pages_reqd, FOLL_WRITE, pages);