X-Git-Url: http://rtime.felk.cvut.cz/gitweb/lincan.git/blobdiff_plain/04ac67cc3cac14cd601daacd0592121ec0b84012..50e9e47fc21191ea9ea758fea1e7f2bd5a275e98:/lincan/src/open.c diff --git a/lincan/src/open.c b/lincan/src/open.c index f785e2c..942225a 100644 --- a/lincan/src/open.c +++ b/lincan/src/open.c @@ -82,6 +82,10 @@ int can_open(struct inode *inode, struct file *file) CANMSG("Error initializing chip for receiving\n"); } +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,10)) + if (chip->hostdevice->hwspecops->release_device) + kref_get(&chip->hostdevice->refcount); +#endif canuser = (struct canuser_t *)kmalloc(sizeof(struct canuser_t), GFP_KERNEL); if(canuser == NULL) goto no_canuser;