X-Git-Url: http://rtime.felk.cvut.cz/gitweb/lincan.git/blobdiff_plain/fb2dd0f20bd6264291dccb5e97609a23cae2fd1a..616491c0579525de71e7647dc36d7fccedf2bc2c:/lincan/src/open_rtl.c diff --git a/lincan/src/open_rtl.c b/lincan/src/open_rtl.c index 230e3eb..66a5bac 100644 --- a/lincan/src/open_rtl.c +++ b/lincan/src/open_rtl.c @@ -4,7 +4,7 @@ * Rewritten for new CAN queues by Pavel Pisa - OCERA team member * email:pisa@cmp.felk.cvut.cz * This software is released under the GPL-License. - * Version lincan-0.2 9 Jul 2003 + * Version lincan-0.3 17 Jun 2004 */ #ifdef CAN_WITH_RTL @@ -25,7 +25,7 @@ static inline int can_open_rtl_common(struct canuser_t *canuser, int open_flags) { struct msgobj_t *obj=canuser->msgobj; - struct chip_t *chip; + struct canchip_t *chip; struct canque_ends_t *qends; struct canque_edge_t *edge; can_spin_irqflags_t iflags; @@ -52,6 +52,8 @@ int can_open_rtl_common(struct canuser_t *canuser, int open_flags) qends = (struct canque_ends_t *)rt_malloc(sizeof(struct canque_ends_t)); if(qends == NULL) goto no_qends; canqueue_ends_init_rtl(qends); + /* mark memory as allocated from RTL memory pool */ + qends->ends_flags|=CAN_ENDSF_MEM_RTL; canuser->qends = qends; can_spin_lock_irqsave(&canuser_manipulation_lock, iflags); @@ -91,7 +93,7 @@ int can_open_rtl_posix(struct rtl_file *fptr) { int ret; struct msgobj_t *obj; - struct chip_t *chip; + struct canchip_t *chip; struct canuser_t *canuser; int minor_nr = RTL_MINOR_FROM_FILEPTR(fptr);