X-Git-Url: http://rtime.felk.cvut.cz/gitweb/lincan.git/blobdiff_plain/d48f5ffafaa5a383c5fdfc7cdd83bb90d14a124c..3c47a7cd435662f7e2daa006596722271f5dd090:/lincan/src/open.c diff --git a/lincan/src/open.c b/lincan/src/open.c index 219aab9..266aed4 100644 --- a/lincan/src/open.c +++ b/lincan/src/open.c @@ -88,6 +88,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;