Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
struct canque_ends_t *qends;
struct msgobj_t *obj;
can_spin_irqflags_t iflags;
+ int minor_nr = INODE2MINOR_NR(inode);
if(!canuser || (canuser->magic != CAN_USER_MAGIC)){
CANMSG("can_close: bad canuser magic\n");
return -ENODEV;
}
- if ((chip=objects_p[MINOR_NR]->hostchip) == NULL) {
- CANMSG("There is no hardware support for the device file with minor nr.: %d\n",MINOR_NR);
+ if ((chip=objects_p[minor_nr]->hostchip) == NULL) {
+ CANMSG("There is no hardware support for the device file with minor nr.: %d\n",minor_nr);
return -ENODEV;
}