]> rtime.felk.cvut.cz Git - lincan.git/blobdiff - lincan/include/main.h
Merge branch 'can-usb1' into spican1
[lincan.git] / lincan / include / main.h
index 853d2ffd453ff03415be66ed8df5a62d63b2d6d8..582d895e09efa924de6465353825c46aacaf5840 100644 (file)
@@ -114,6 +114,10 @@ struct candevice_t {
 
        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
@@ -337,6 +341,11 @@ struct hwspecops_t {
        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
+       
 };
 
 /**
@@ -570,4 +579,5 @@ extern int can_rtl_priority;
 #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);