]> rtime.felk.cvut.cz Git - lincan.git/blobdiff - lincan/src/modparms.c
Merge branch 'master' into can-usb1
[lincan.git] / lincan / src / modparms.c
index 1608bd2d080b8af3009f55c692fd4028561383da..c53971f790a4a5c8ab30e72fd13449d013849aa9 100644 (file)
@@ -4,15 +4,12 @@
  * Rewritten for new CAN queues by Pavel Pisa - OCERA team member
  * email:pisa@cmp.felk.cvut.cz
  * This software is released under the GPL-License.
- * Version lincan-0.2  9 Jul 2003
+ * Version lincan-0.3  17 Jun 2004
  */
 
 
-#include <linux/autoconf.h>
-
-#include <linux/string.h>
-#include <linux/fs.h>
-
+#include "../include/can.h"
+#include "../include/can_sysdep.h"
 #include "../include/main.h"
 #include "../include/modparms.h"
 
@@ -22,9 +19,10 @@ int parse_mod_parms(void)
        const struct boardtype_t *brp;
 
        if ( (hw[0] == NULL) | (io[0] == -1) ) {
-               CANMSG("You must supply your type of hardware, interrupt numbers and io address.\n");
-               CANMSG("Example: # insmod can.o hw=pip5 irq=4 io=0x8000\n");
-               return -ENODEV;
+               //CANMSG("You must supply your type of hardware, interrupt numbers and io address.\n");
+               CANMSG("Autodetection works only for USB devices, supply your type of hardware for PCI devices \n");
+               CANMSG("Example: # insmod lincan.ko hw=pip5 irq=4 io=0x8000\n");
+               //return -ENODEV;
        }
 
        while ( (hw[i] != NULL) && (i < MAX_HW_CARDS) ) {
@@ -39,7 +37,7 @@ int parse_mod_parms(void)
 
        /* Check wether the supplied number of io addresses is correct. */
        io_needed=i;
-       while ( (io[io_supplied] != -1) & (io_supplied<MAX_HW_CARDS) ) 
+       while ( (io[io_supplied] != -1) & (io_supplied<MAX_HW_CARDS) )
                io_supplied++;
        if (io_needed != io_supplied) {
                CANMSG("Invalid number of io addresses.\n");
@@ -67,7 +65,7 @@ int parse_mod_parms(void)
        if (minor[0] != -1) {
                minor_needed=irq_needed;
                while ((minor[minor_supplied] != -1) & (minor_supplied<MAX_IRQ))
-                       minor_supplied++; 
+                       minor_supplied++;
                if (minor_supplied != minor_needed) {
                        CANMSG("Invalid number of minor numbers.\n");
                        CANMSG("Supplied hardware needs %d minor number(s).\n",minor_needed);