#if defined(CONFIG_OC_LINCAN_CARD_usbcan)
#include "../include/usbcan.h"
#endif
+#if defined(CONFIG_OC_LINCAN_CARD_omap2_spican)
+ #include "../include/omap2_spican.h"
+#endif
can_spinlock_t canuser_manipulation_lock;
goto memory_error;
}
#endif
+#if defined(CONFIG_OC_LINCAN_CARD_omap2_spican)
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23)
+ res = omap2_spican_init();
+ if (res){
+ CANMSG("omap2_spican_register for omap2_spican failed. Error number %d.\n", res);
+ goto memory_error;
+ }
+ #else
+ #error There's no support for OMAP2 SPI subsystem in kernel versions before 2.6.23
+ #endif
+#endif
return 0;
+
struct candevice_t* register_hotplug_dev(const char *hwname,int (*chipdataregfnc)(struct canchip_t *ch,void *data),void *devdata){
int i=0, j, board=0;
struct candevice_t *candev;
DEBUGMSG("Unregistering usbcan.\n");
usbcan_exit();
#endif
-
+#if defined(CONFIG_OC_LINCAN_CARD_omap2_spican)
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23)
+ DEBUGMSG("Unregistering omap2_spican.\n");
+ omap2_spican_exit();
+ #endif
+#endif
DEBUGMSG("Continuing with coldplug cleanup.\n");
#ifdef CONFIG_PROC_FS
if (can_delete_procdir())
#endif /*CAN_WITH_RTL*/
DEBUGMSG("Can hardware cleanup done, freeing memory.\n");
-
+
if ( can_del_mem_list() )
CANMSG("Error deallocating memory\n");