]> rtime.felk.cvut.cz Git - lincan.git/blobdiff - lincan/src/tscan1.c
Corrected print of address in report of card presence check failure.
[lincan.git] / lincan / src / tscan1.c
index 841970a2adbc14369beea8802c2f171ad949f70b..5f7ca7aa42d98e6b2573cac60ef747c1ff84bcb2 100644 (file)
@@ -281,10 +281,11 @@ int tscan1_init_hw_data(struct candevice_t *candev)
        io_addr = candev->io_addr;
 
        if(io_addr && (io_addr != (unsigned long)-1)) {
        io_addr = candev->io_addr;
 
        if(io_addr && (io_addr != (unsigned long)-1)) {
-               remap_io_addr = io_addr = tsxxx_base;
+               remap_io_addr = io_addr + tsxxx_base;
 
                if(tscan1_check_presence(remap_io_addr, &jmp)){
 
                if(tscan1_check_presence(remap_io_addr, &jmp)){
-                       CANMSG("No TSCAN1 card found at address 0xlx\n");
+                       CANMSG("No TSCAN1 card found at address 0x%lx\n",
+                               remap_io_addr);
                        return -ENODEV;
                }
        } else {
                        return -ENODEV;
                }
        } else {
@@ -298,7 +299,7 @@ int tscan1_init_hw_data(struct candevice_t *candev)
                        }
 
                        io_addr = TSCAN1_BASE_IO + i*TSXXX_IO_RANGE;
                        }
 
                        io_addr = TSCAN1_BASE_IO + i*TSXXX_IO_RANGE;
-                       remap_io_addr = io_addr = tsxxx_base;
+                       remap_io_addr = io_addr + tsxxx_base;
 
                        for (j = 0; j < MAX_HW_CARDS; j++) {
                                if(io[j] == io_addr){
 
                        for (j = 0; j < MAX_HW_CARDS; j++) {
                                if(io[j] == io_addr){
@@ -368,10 +369,11 @@ int ts7kv_init_hw_data(struct candevice_t *candev)
        io_addr = candev->io_addr;
 
        if(io_addr && (io_addr != (unsigned long)-1)) {
        io_addr = candev->io_addr;
 
        if(io_addr && (io_addr != (unsigned long)-1)) {
-               remap_io_addr = io_addr = tsxxx_base;
+               remap_io_addr = io_addr + tsxxx_base;
 
                if(ts7kv_check_presence(remap_io_addr, &jmp)){
 
                if(ts7kv_check_presence(remap_io_addr, &jmp)){
-                       CANMSG("No TS7KV card found at address 0xlx\n");
+                       CANMSG("No TS7KV card found at address 0x%lx\n",
+                              remap_io_addr);
                        return -ENODEV;
                }
        } else {
                        return -ENODEV;
                }
        } else {
@@ -385,7 +387,7 @@ int ts7kv_init_hw_data(struct candevice_t *candev)
                        }
 
                        io_addr = TS7KV_BASE_IO + i*TSXXX_IO_RANGE;
                        }
 
                        io_addr = TS7KV_BASE_IO + i*TSXXX_IO_RANGE;
-                       remap_io_addr = io_addr = tsxxx_base;
+                       remap_io_addr = io_addr + tsxxx_base;
 
                        for (j = 0; j < MAX_HW_CARDS; j++) {
                                if(io[j] == io_addr){
 
                        for (j = 0; j < MAX_HW_CARDS; j++) {
                                if(io[j] == io_addr){