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