X-Git-Url: http://rtime.felk.cvut.cz/gitweb/lincan.git/blobdiff_plain/94b8e4f0425cebad0a186daf054168fa6910f9b8..91dfab84182937b62ef64cb12d8e4f89e6d5c3ec:/lincan/src/main.c diff --git a/lincan/src/main.c b/lincan/src/main.c index a1b6631..918c2f7 100644 --- a/lincan/src/main.c +++ b/lincan/src/main.c @@ -54,6 +54,7 @@ #include "../include/ioctl.h" #include "../include/write.h" #include "../include/finish.h" +#include "../include/fasync.h" #define EXPORT_SYMTAB @@ -111,33 +112,21 @@ devfs_handle_t devfs_handles[MAX_TOT_MSGOBJS]; */ struct mem_addr *mem_head=NULL; -#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,3,0)) -struct file_operations can_fops= -{ - NULL, /* llseek */ - read: can_read, - write: can_write, - NULL, /* readdir */ - poll: can_poll, - ioctl: can_ioctl, - NULL, /* mmap */ - open: can_open, - NULL, /* flush */ - release: can_close, - NULL, /* fsync */ -}; -#else struct file_operations can_fops= { + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,0)) owner: THIS_MODULE, + #endif read: can_read, write: can_write, poll: can_poll, ioctl: can_ioctl, open: can_open, release: can_close, + #ifdef CAN_ENABLE_KERN_FASYNC + fasync: can_fasync + #endif /*CAN_ENABLE_KERN_FASYNC*/ }; -#endif EXPORT_SYMBOL(can_fops); @@ -178,7 +167,7 @@ int init_module(void) goto reset_error; } - spin_lock_init(&hardware_p->rtr_lock); + can_spin_lock_init(&hardware_p->rtr_lock); hardware_p->rtr_queue=NULL; for (i=0; inr_boards; i++) {