X-Git-Url: http://rtime.felk.cvut.cz/gitweb/lincan.git/blobdiff_plain/32115f5fda63ffe8b582a10d2f55ae765fec4f41..3cec91e940ca501534d28d6893bb80996ecd3206:/lincan/src/setup.c diff --git a/lincan/src/setup.c b/lincan/src/setup.c index 525539f..d20bac9 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; @@ -346,6 +350,7 @@ int init_chip_struct(struct candevice_t *candev, int chipnr, int irq, long baudr chip->write_register=candev->hwspecops->write_register; chip->read_register=candev->hwspecops->read_register; chip->spi_transfer=candev->hwspecops->spi_transfer; + chip->spi_async_transfer=candev->hwspecops->spi_async_transfer; chip->spi_acquire_bus=candev->hwspecops->spi_acquire_bus; chip->spi_release_bus=candev->hwspecops->spi_release_bus;