]> rtime.felk.cvut.cz Git - lincan.git/blobdiff - lincan/src/c_can_irq.c
First part of IRQ handling changes
[lincan.git] / lincan / src / c_can_irq.c
index d114336c68a1cca8b7606ce5ce194b8b2c909026..71e84fcf18855b8f6286763da722f8b1099302cc 100644 (file)
@@ -214,10 +214,9 @@ void c_can_irq_sync_activities(struct chip_t *chip, struct msgobj_t *obj)
 // c_can_irq_handler
 //
 
-can_irqreturn_t c_can_irq_handler(int irq, void *dev_id, struct pt_regs *regs)
+int c_can_irq_handler(int irq, struct chip_t *chip)
 {
        struct rtr_id *rtr_search = hardware_p->rtr_queue;
-       struct chip_t *pchip = (struct chip_t *)dev_id;
        u16 chip_status;
        int id0=0, id1=0;
        u16 errcount = 0;
@@ -240,7 +239,7 @@ can_irqreturn_t c_can_irq_handler(int irq, void *dev_id, struct pt_regs *regs)
                DEBUGMSG( "\n(c%d)IRQ handler: addr=%.8lx spurious interrupt\n",
                        pchip->chip_idx,
                        (long)( pchip->/*v*/chip_base_addr/* + CCSR*/));
-               return CAN_IRQ_NONE;
+               return CANCHIP_IRQ_NONE;
        }
        
        DEBUGMSG( "\n(c%d)IRQ handler: addr=%.8lx irqreg=0x%.4x\n",
@@ -476,7 +475,7 @@ can_irqreturn_t c_can_irq_handler(int irq, void *dev_id, struct pt_regs *regs)
                // Get irq status again
                irqreg = c_can_read_reg_w( pchip, CCINTR );
        }
-       return CAN_IRQ_HANDLED;
+       return CANCHIP_IRQ_HANDLED;
 }
 
 ///////////////////////////////////////////////////////////////////////////////