X-Git-Url: http://rtime.felk.cvut.cz/gitweb/lincan.git/blobdiff_plain/3810959545bb02dd92e5ad90531af62e3c985da6..50e9e47fc21191ea9ea758fea1e7f2bd5a275e98:/lincan/src/close.c diff --git a/lincan/src/close.c b/lincan/src/close.c index 157acfa..a4dfe12 100644 --- a/lincan/src/close.c +++ b/lincan/src/close.c @@ -49,7 +49,7 @@ int can_close(struct inode *inode, struct file *file) struct canque_ends_t *qends; struct msgobj_t *obj; can_spin_irqflags_t iflags; - + if(!canuser || (canuser->magic != CAN_USER_MAGIC)){ CANMSG("can_close: bad canuser magic\n"); return -ENODEV; @@ -58,10 +58,10 @@ int can_close(struct inode *inode, struct file *file) CANMSG("There is no hardware support for the device file with minor nr.: %d\n",MINOR_NR); return -ENODEV; } - + obj = canuser->msgobj; qends = canuser->qends; - + #ifdef CAN_ENABLE_KERN_FASYNC can_fasync(-1, file, 0); @@ -81,7 +81,7 @@ int can_close(struct inode *inode, struct file *file) can_msgobj_clear_fl(obj,OPENED); }; can_spin_unlock_irqrestore(&canuser_manipulation_lock, iflags); - + #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,50)) MOD_DEC_USE_COUNT; #endif