struct canhardware_t *hosthardware_p;
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,10))
+ struct kref refcount;
+#endif
+
union {
void *anydev;
#ifdef CAN_ENABLE_PCI_SUPPORT
int (*spi_acquire_bus)(struct candevice_t *candev, short channel, int block);
void (*spi_release_bus)(struct candevice_t *candev, short channel);
int (*spi_transfer)(struct candevice_t *candev, void *tx, void *rx, uint16_t len);
+
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,10))
+ void (*release_device)(struct kref *refcount);
+#endif
+
};
/**
#endif /*CAN_WITH_RTL*/
extern struct candevice_t* register_hotplug_dev(const char *hwname,int (*chipdataregfnc)(struct canchip_t *chip,void *data),void *devdata);
+extern void deregister_hotplug_dev(struct candevice_t *dev);
extern void cleanup_hotplug_dev(struct candevice_t *dev);