X-Git-Url: http://rtime.felk.cvut.cz/gitweb/lincan.git/blobdiff_plain/32115f5fda63ffe8b582a10d2f55ae765fec4f41..16e7fc19118a4f24bda40b18eaf03273577c83da:/lincan/src/setup.c diff --git a/lincan/src/setup.c b/lincan/src/setup.c index 525539f..d378617 100644 --- a/lincan/src/setup.c +++ b/lincan/src/setup.c @@ -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;