]> rtime.felk.cvut.cz Git - lincan.git/blobdiff - lincan/src/setup.c
Merge branch 'can-usb1' into spican1
[lincan.git] / lincan / src / setup.c
index 525539ff641ec6026a8cb2dcee32b463778fb0bf..d378617b55359fdbe8f86caf3e7ebe85c6a5dc19 100644 (file)
@@ -255,6 +255,10 @@ int init_device_struct(int card, int *chan_param_idx_p, int *irq_param_idx_p)
        candev->dev_base_addr=io[card];
        clock=clockfreq[card];
 
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,10))
+       kref_init(&candev->refcount);
+#endif
+
        candev->hwspecops=(struct hwspecops_t *)can_checked_malloc(sizeof(struct hwspecops_t));
        if (candev->hwspecops==NULL)
                goto error_nomem;