]> rtime.felk.cvut.cz Git - lincan.git/blobdiff - lincan/src/can_devrtl.c
To prevent future name collisions "chip_t" changed to "canchip_t"
[lincan.git] / lincan / src / can_devrtl.c
index c570f1bdb7a6fc4bc12a4313b2e0630c7da97ca5..4557531d38dfa08e5a0bbfc177b04d634b1b7986 100644 (file)
@@ -26,7 +26,7 @@ can_spinlock_t can_irq_manipulation_lock;
 
 unsigned int can_rtl_isr( unsigned int irq_num, struct pt_regs *r )
 {
-       struct chip_t *chip;
+       struct canchip_t *chip;
        struct candevice_t *candev;
        int board_nr;
        int chip_nr;
@@ -80,7 +80,7 @@ rtl_free_global_irq( irq )
 
 void * can_chip_worker_thread(void *arg)
 {
-       struct chip_t *chip = (struct chip_t *) arg;
+       struct canchip_t *chip = (struct canchip_t *) arg;
        struct msgobj_t *obj;
        int ret, i;
        int loop_cnt;
@@ -134,9 +134,12 @@ void * can_chip_worker_thread(void *arg)
                  but it seems to not work without that */
                if(chip->chip_irq>=0) {
                        if ((chip->flags & CHIP_IRQ_VME) == 0) can_enable_irq(chip->chip_irq);
+                   #ifdef CAN_ENABLE_VME_SUPPORT
                        else tundra_rtl_enable_pci_irq(); 
                        /* FIXME: Bad practice. Doesn't work with more
                         * than one card. */
+                   #endif /*CAN_ENABLE_VME_SUPPORT*/
+
                }
 
                RTL_MARK_SUSPENDED(pthread_self());
@@ -151,7 +154,7 @@ void * can_chip_worker_thread(void *arg)
 }
 
 
-int can_chip_setup_irq(struct chip_t *chip)
+int can_chip_setup_irq(struct canchip_t *chip)
 {
        int ret;
         struct sched_param sched_param;
@@ -192,7 +195,7 @@ int can_chip_setup_irq(struct chip_t *chip)
 }
 
 
-void can_chip_free_irq(struct chip_t *chip)
+void can_chip_free_irq(struct canchip_t *chip)
 {
        if(chip->worker_thread)
                pthread_delete_np(chip->worker_thread);