can_spin_irqflags_t iflags;
char openflag; // Martin Petera: Object already opened
- if ( ((obj=objects_p[MINOR_NR]) == NULL) ||
+ if ( ((obj=objects_p[MINOR_NR]) == NULL) ||
((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;
openflag = can_msgobj_test_fl(obj,OPENED); // Martin Petera: store previous status
can_msgobj_set_fl(obj,OPENED);
- if (chip->flags & CHIP_CONFIGURED)
+ if (chip->flags & CHIP_CONFIGURED)
DEBUGMSG("Device is already configured.\n");
else {
if (chip->chipspecops->chip_config(chip))
CANMSG("Error configuring chip.\n");
else
- chip->flags |= CHIP_CONFIGURED;
+ chip->flags |= CHIP_CONFIGURED;
} /* End of chip configuration */
if(qends == NULL) goto no_qends;
canqueue_ends_init_kern(qends);
canuser->qends = qends;
-
+
/*required to synchronize with RT-Linux context*/
can_spin_lock_irqsave(&canuser_manipulation_lock, iflags);
list_add(&canuser->peers, &obj->obj_users);
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,50))
MOD_INC_USE_COUNT;
-#endif
+#endif
return 0;