]> rtime.felk.cvut.cz Git - lincan.git/commitdiff
Corrected bad device_lock references by value found in IXXAT iPC-I 165 code
authorppisa <ppisa>
Thu, 19 Jan 2006 12:25:59 +0000 (12:25 +0000)
committerppisa <ppisa>
Thu, 19 Jan 2006 12:25:59 +0000 (12:25 +0000)
to the pointer kind parameters for can_spin_xxx calls.

lincan/src/ipci165.c

index debe2c4a05ba7c9af967012ff390aaf1288f7773..5ca7bc45d987ad6b1db28f031507fc6ef32bebc5 100644 (file)
@@ -90,13 +90,13 @@ int bci_command(struct candevice_t *candev, char cmd, int size, char *data)
   }
 
   /* grant access to the command buffer */
   }
 
   /* grant access to the command buffer */
-  can_spin_lock(candev->device_lock);
+  can_spin_lock(&candev->device_lock);
 
   // check command buffer status
   if (readb(dpram_addr + OF_BCI_SYNC) != 0)
   {
     /* something went wrong ... */
 
   // check command buffer status
   if (readb(dpram_addr + OF_BCI_SYNC) != 0)
   {
     /* something went wrong ... */
-    can_spin_unlock(candev->device_lock);
+    can_spin_unlock(&candev->device_lock);
     DEBUGMSG ("ipci165_bci_command: command buffer is busy\n");
     return (-EBUSY);
   }
     DEBUGMSG ("ipci165_bci_command: command buffer is busy\n");
     return (-EBUSY);
   }
@@ -143,7 +143,7 @@ int bci_response(struct candevice_t *candev, char cmd, int *size, char *data)
     {
       /* timeout occured */
       /* release the lock */
     {
       /* timeout occured */
       /* release the lock */
-      can_spin_unlock(candev->device_lock);
+      can_spin_unlock(&candev->device_lock);
       CANMSG ("BCI timeout!\n");
       return -EBUSY;
     }
       CANMSG ("BCI timeout!\n");
       return -EBUSY;
     }
@@ -158,7 +158,7 @@ int bci_response(struct candevice_t *candev, char cmd, int *size, char *data)
     /* release the buffer */
     writeb(0, dpram_addr + OF_BCI_SYNC);
     /* unlock the access */
     /* release the buffer */
     writeb(0, dpram_addr + OF_BCI_SYNC);
     /* unlock the access */
-    can_spin_unlock(candev->device_lock);
+    can_spin_unlock(&candev->device_lock);
 
     DEBUGMSG ("ipci165_bci_command: invalid answer\n");
     return -EIO;
 
     DEBUGMSG ("ipci165_bci_command: invalid answer\n");
     return -EIO;
@@ -168,7 +168,7 @@ int bci_response(struct candevice_t *candev, char cmd, int *size, char *data)
   /* release the buffer */
   writeb(0, dpram_addr + OF_BCI_SYNC);
   /* unlock the access */
   /* release the buffer */
   writeb(0, dpram_addr + OF_BCI_SYNC);
   /* unlock the access */
-  can_spin_unlock(candev->device_lock);
+  can_spin_unlock(&candev->device_lock);
   return 0;
 }
 
   return 0;
 }
 
@@ -1388,7 +1388,7 @@ int ipci165_init_hw_data(struct candevice_t *candev)
   candev->nr_all_chips=2; 
   candev->flags |= CANDEV_PROGRAMMABLE_IRQ*0;
   /* initialize device spinlock */
   candev->nr_all_chips=2; 
   candev->flags |= CANDEV_PROGRAMMABLE_IRQ*0;
   /* initialize device spinlock */
-  can_spin_lock_init(candev->device_lock);
+  can_spin_lock_init(&candev->device_lock);
 
   return 0;
 }
 
   return 0;
 }