* Version 0.7 6 Aug 2001
*/
+#define __NO_VERSION__
+#include <linux/module.h>
+
#include <linux/autoconf.h>
#if defined (CONFIG_MODVERSIONS) && !defined (MODVERSIONS)
#define MODVERSIONS
#include <linux/modversions.h>
#endif
+#include <linux/version.h>
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
#include <linux/malloc.h>
+#else
+#include <linux/slab.h>
+#endif
#include <linux/fs.h>
-#include "../.support"
+#include ".supported_cards.h"
#include "../include/main.h"
#include "../include/setup.h"
extern int aim104_register(struct hwspecops_t *hwspecops);
extern int pcccan_register(struct hwspecops_t *hwspecops);
extern int ssv_register(struct hwspecops_t *hwspecops);
+extern int bfadcan_register(struct hwspecops_t *hwspecops);
+extern int pikronisa_register(struct hwspecops_t *hwspecops);
int init_device_struct(int card);
int init_hwspecops(int card);
DEBUGMSG("del_mem_from_list %p, mem_head=%p\n", address_p, mem_head);
return 0;
#endif
-
+ if(mem_head == NULL) {
+ CANMSG("del_mem_from_list: mem_head == NULL address_p=%p!\n",
+ address_p);
+ return 0;
+ }
+
mem_search = mem_head;
if (mem_head->address == address_p) {
DEBUGMSG("del_mem_list, mem_head=%p\n", mem_head);
return 0;
#endif
+ if(mem_head == NULL) {
+ CANMSG("del_mem_list: mem_head == NULL!\n");
+ return 0;
+ }
while (mem_head->next != NULL) {
mem_old=mem_head;
int init_hwspecops(int card)
{
- #ifdef TEMPLATE
+ #ifdef ENABLE_CARD_template
if (!strcmp(candevices_p[card]->hwname,"template")) {
template_register(candevices_p[card]->hwspecops);
}
#endif
- #ifdef PIP
+ #ifdef ENABLE_CARD_pip
if (!strcmp(candevices_p[card]->hwname,"pip5")) {
pip5_register(candevices_p[card]->hwspecops);
}
pip6_register(candevices_p[card]->hwspecops);
}
#endif
- #ifdef SMARTCAN
+ #ifdef ENABLE_CARD_smartcan
if (!strcmp(candevices_p[card]->hwname,"smartcan")) {
smartcan_register(candevices_p[card]->hwspecops);
}
#endif
- #ifdef NSI
+ #ifdef ENABLE_CARD_nsi
if (!strcmp(candevices_p[card]->hwname,"nsican")) {
nsi_register(candevices_p[card]->hwspecops);
}
#endif
- #ifdef CC104
+ #ifdef ENABLE_CARD_cc_can104
if (!strcmp(candevices_p[card]->hwname,"cc104")) {
cc104_register(candevices_p[card]->hwspecops);
}
#endif
- #ifdef AIM104
+ #ifdef ENABLE_CARD_aim104
if (!strcmp(candevices_p[card]->hwname,"aim104")) {
aim104_register(candevices_p[card]->hwspecops);
}
#endif
- #ifdef PCI03
+ #ifdef ENABLE_CARD_pc_i03
if (!strcmp(candevices_p[card]->hwname,"pc-i03")) {
pci03_register(candevices_p[card]->hwspecops);
}
#endif
- #ifdef PCM3680
+ #ifdef ENABLE_CARD_pcm3680
if (!strcmp(candevices_p[card]->hwname,"pcm3680")) {
pcm3680_register(candevices_p[card]->hwspecops);
}
#endif
- #ifdef PCCAN
+ #ifdef ENABLE_CARD_pccan
if (!strcmp(candevices_p[card]->hwname,"pccan-f") |
!strcmp(candevices_p[card]->hwname,"pccan-s") ) {
pccanf_register(candevices_p[card]->hwspecops);
pccanq_register(candevices_p[card]->hwspecops);
}
#endif
- #ifdef M437
+ #ifdef ENABLE_CARD_m437
if (!strcmp(candevices_p[card]->hwname,"m437")) {
m437_register(candevices_p[card]->hwspecops);
}
#endif
- #ifdef PCCCAN
+ #ifdef ENABLE_CARD_pcccan
if (!strcmp(candevices_p[card]->hwname,"pcccan")) {
pcccan_register(candevices_p[card]->hwspecops);
}
#endif
- #ifdef SSV
+ #ifdef ENABLE_CARD_ssv
if (!strcmp(candevices_p[card]->hwname,"ssv")) {
ssv_register(candevices_p[card]->hwspecops);
}
#endif
+ #ifdef ENABLE_CARD_bfadcan
+ if (!strcmp(candevices_p[card]->hwname,"bfadcan")) {
+ bfadcan_register(candevices_p[card]->hwspecops);
+ }
+ #endif
+ #ifdef ENABLE_CARD_pikronisa
+ if (!strcmp(candevices_p[card]->hwname,"pikronisa")) {
+ pikronisa_register(candevices_p[card]->hwspecops);
+ }
+ #endif
return 0;
}