From: ppisa Date: Tue, 30 Aug 2005 20:42:00 +0000 (+0200) Subject: Merge: Fixed bug message objects indexing introduced by previous driver changes. X-Git-Tag: CLT_COMM_CAN_usb_can1_kriz_bp~47 X-Git-Url: http://rtime.felk.cvut.cz/gitweb/lincan.git/commitdiff_plain/57a9f2211025914d417c9593b5a0be8574b6a8cd?hp=e9956e90300c765498554ea6f5928edbafd825fd Merge: Fixed bug message objects indexing introduced by previous driver changes. Merge commit 'remotes/sf-ocera-lincan/master' --- diff --git a/lincan/src/i82527.c b/lincan/src/i82527.c index 60096c5..5ef9d8f 100644 --- a/lincan/src/i82527.c +++ b/lincan/src/i82527.c @@ -248,7 +248,7 @@ int i82527_clear_objects(struct canchip_t *chip) DEBUGMSG("Cleared all message objects on chip\n"); - for (i=1; i<=15; i++) { + for (i=0; imax_objects; i++) { obj=chip->msgobj[i]; canobj_write_reg(chip,obj,(INTPD_RES|RXIE_RES|TXIE_RES|MVAL_RES),iMSGCTL0); canobj_write_reg(chip,obj,(NEWD_RES|MLST_RES|TXRQ_RES|RMPD_RES), iMSGCTL1); @@ -665,7 +665,7 @@ int i82527_irq_handler(int irq, struct canchip_t *chip) if (irq_register == 0x02) object = 14; - else if(irq_register < 14) + else if(irq_register <= 13+3) object = irq_register-3; else return CANCHIP_IRQ_NONE;