]> rtime.felk.cvut.cz Git - lincan.git/blobdiff - lincan/src/open.c
Merge branch 'master' into can-usb1
[lincan.git] / lincan / src / open.c
index 219aab96787bb618e0febb8cc0578ee321266b1f..266aed414743109592a41cfade17c54f15332bd4 100644 (file)
@@ -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;