#include <linux/modversions.h>
#endif
-#include "../.support"
-#ifndef PIP
-#define PIP 0
+#include ".supported_cards.h"
+
+#ifndef ENABLE_CARD_pip
+#define ENABLE_CARD_pip 0
+#endif
+#ifndef ENABLE_CARD_smartcan
+#define ENABLE_CARD_smartcan 0
+#endif
+#ifndef ENABLE_CARD_pccan
+#define ENABLE_CARD_pccan 0
#endif
-#ifndef SMARTCAN
-#define SMARTCAN 0
+#ifndef ENABLE_CARD_nsi
+#define ENABLE_CARD_nsi 0
#endif
-#ifndef PCCAN
-#define PCCAN 0
+#ifndef ENABLE_CARD_cc_can104
+#define ENABLE_CARD_cc_can104 0
#endif
-#ifndef NSI
-#define NSI 0
+#ifndef ENABLE_CARD_aim104
+#define ENABLE_CARD_aim104 0
#endif
-#ifndef CC104
-#define CC104 0
+#ifndef ENABLE_CARD_pc_i03
+#define ENABLE_CARD_pc_i03 0
#endif
-#ifndef AIM104
-#define AIM104 0
+#ifndef ENABLE_CARD_pcm3680
+#define ENABLE_CARD_pcm3680 0
#endif
-#ifndef PCI03
-#define PCI03 0
+#ifndef ENABLE_CARD_m437
+#define ENABLE_CARD_m437 0
#endif
-#ifndef PCM3680
-#define PCM3680 0
+#ifndef ENABLE_CARD_pcccan
+#define ENABLE_CARD_pcccan 0
#endif
-#ifndef M437
-#define M437 0
+#ifndef ENABLE_CARD_ssv
+#define ENABLE_CARD_ssv 0
#endif
-#ifndef PCCCAN
-#define PCCCAN 0
+#ifndef ENABLE_CARD_bfadcan
+#define ENABLE_CARD_bfadcan 0
#endif
-#ifndef SSV
-#define SSV 0
+#ifndef ENABLE_CARD_pikronisa
+#define ENABLE_CARD_pikronisa 0
#endif
-#ifndef TEMPLATE
-#define TEMPLATE 0
+#ifndef ENABLE_CARD_template
+#define ENABLE_CARD_template 0
#endif
#include <linux/string.h>
}
while ( (hw[i] != NULL) && (i < MAX_HW_CARDS) ) {
- if ( !strcmp(hw[i],"pip5") && PIP )
+ if ( !strcmp(hw[i],"pip5") && ENABLE_CARD_pip )
irq_needed++;
- else if (!strcmp(hw[i],"pip6") && PIP)
+ else if (!strcmp(hw[i],"pip6") && ENABLE_CARD_pip)
irq_needed++;
- else if (!strcmp(hw[i],"smartcan") && SMARTCAN)
+ else if (!strcmp(hw[i],"smartcan") && ENABLE_CARD_smartcan)
irq_needed++;
- else if (!strcmp(hw[i],"pccan-q") && PCCAN)
+ else if (!strcmp(hw[i],"pccan-q") && ENABLE_CARD_pccan)
irq_needed=irq_needed+4;
- else if (!strcmp(hw[i],"pccan-f") && PCCAN)
+ else if (!strcmp(hw[i],"pccan-f") && ENABLE_CARD_pccan)
irq_needed++;
- else if (!strcmp(hw[i],"pccan-s") && PCCAN)
+ else if (!strcmp(hw[i],"pccan-s") && ENABLE_CARD_pccan)
irq_needed++;
- else if (!strcmp(hw[i],"pccan-d") && PCCAN)
+ else if (!strcmp(hw[i],"pccan-d") && ENABLE_CARD_pccan)
irq_needed=irq_needed+2;
- else if (!strcmp(hw[i],"nsican") && NSI)
+ else if (!strcmp(hw[i],"nsican") && ENABLE_CARD_nsi)
irq_needed++;
- else if (!strcmp(hw[i],"cc104") && CC104)
+ else if (!strcmp(hw[i],"cc104") && ENABLE_CARD_cc_can104)
irq_needed++;
- else if (!strcmp(hw[i],"aim104") && AIM104)
+ else if (!strcmp(hw[i],"aim104") && ENABLE_CARD_aim104)
irq_needed++;
- else if (!strcmp(hw[i],"pc-i03") && PCI03)
+ else if (!strcmp(hw[i],"pc-i03") && ENABLE_CARD_pc_i03)
irq_needed++;
- else if (!strcmp(hw[i],"pcm3680") && PCM3680)
+ else if (!strcmp(hw[i],"pcm3680") && ENABLE_CARD_pcm3680)
irq_needed=irq_needed+2;
- else if (!strcmp(hw[i],"m437") && M437)
+ else if (!strcmp(hw[i],"m437") && ENABLE_CARD_m437)
irq_needed++;
- else if (!strcmp(hw[i],"pcccan") && PCCCAN)
+ else if (!strcmp(hw[i],"pcccan") && ENABLE_CARD_pcccan)
irq_needed++;
- else if (!strcmp(hw[i],"ssv") && SSV)
+ else if (!strcmp(hw[i],"ssv") && ENABLE_CARD_ssv)
irq_needed=irq_needed+2;
- else if (!strcmp(hw[i],"template") && TEMPLATE);
+ else if (!strcmp(hw[i],"bfadcan") && ENABLE_CARD_bfadcan)
+ irq_needed++;
+ else if (!strcmp(hw[i],"pikronisa") && ENABLE_CARD_pikronisa)
+ irq_needed++;
+ else if (!strcmp(hw[i],"template") && ENABLE_CARD_template);
else {
CANMSG("Sorry, hardware \"%s\" is currently not supported.\n",hw[i]);
return -EINVAL;
while ( (irq[irq_supplied] != -1) & (irq_supplied<MAX_IRQ) )
irq_supplied++;
while ( (hw[j] != NULL) && (j<MAX_HW_CARDS) ) {
- if (!strcmp(hw[j],"template") && TEMPLATE)
+ if (!strcmp(hw[j],"template") && ENABLE_CARD_template)
irq_needed = irq_supplied;
j++;
}