X-Git-Url: http://rtime.felk.cvut.cz/gitweb/lincan.git/blobdiff_plain/c3adf4f9af7ee68df8bb65fafa4dbcbdcc4895ba..fdf877c54ec2598864f6193e8e1fbaedb5c05efb:/lincan/src/open.c diff --git a/lincan/src/open.c b/lincan/src/open.c index 535c2c3..f0c3fd2 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;