X-Git-Url: http://rtime.felk.cvut.cz/gitweb/lincan.git/blobdiff_plain/94b8e4f0425cebad0a186daf054168fa6910f9b8..91dfab84182937b62ef64cb12d8e4f89e6d5c3ec:/lincan/src/close.c diff --git a/lincan/src/close.c b/lincan/src/close.c index c42869e..4df1533 100644 --- a/lincan/src/close.c +++ b/lincan/src/close.c @@ -13,6 +13,7 @@ #include "../include/close.h" #include "../include/i82527.h" #include "../include/setup.h" +#include "../include/fasync.h" #define __NO_VERSION__ #include @@ -31,6 +32,12 @@ int can_close(struct inode *inode, struct file *file) obj = canuser->msgobj; qends = canuser->qends; + #ifdef CAN_ENABLE_KERN_FASYNC + + can_fasync(-1, file, 0); + + #endif /*CAN_ENABLE_KERN_FASYNC*/ + list_del(&canuser->peers); canuser->qends = NULL; canqueue_ends_dispose_kern(qends, file->f_flags & O_SYNC); @@ -42,8 +49,8 @@ int can_close(struct inode *inode, struct file *file) /* FIXME: what about clearing chip HW status, stopping sending messages etc? */ }; -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,50)) + #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,50)) MOD_DEC_USE_COUNT; -#endif + #endif return 0; }