]> rtime.felk.cvut.cz Git - lincan.git/blobdiff - lincan/src/open.c
LinCAN sources go through big white-space cleanup.
[lincan.git] / lincan / src / open.c
index 535c2c3848134130ca6eb43d8c86df4a9af7994d..f785e2c17efe5212b1680d1b2ababec2512122c9 100644 (file)
@@ -51,7 +51,7 @@ int can_open(struct inode *inode, struct file *file)
        can_spin_irqflags_t iflags;
        char openflag;          // Martin Petera: Object already opened
 
        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;
                        ((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;
@@ -62,13 +62,13 @@ int can_open(struct inode *inode, struct file *file)
        openflag = can_msgobj_test_fl(obj,OPENED);      // Martin Petera: store previous status
        can_msgobj_set_fl(obj,OPENED);
 
        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
                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 */
 
 
        } /* End of chip configuration */
 
 
@@ -95,7 +95,7 @@ int can_open(struct inode *inode, struct file *file)
        if(qends == NULL) goto no_qends;
        canqueue_ends_init_kern(qends);
        canuser->qends = qends;
        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);
        /*required to synchronize with RT-Linux context*/
        can_spin_lock_irqsave(&canuser_manipulation_lock, iflags);
        list_add(&canuser->peers, &obj->obj_users);
@@ -112,7 +112,7 @@ int can_open(struct inode *inode, struct file *file)
 
 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,50))
        MOD_INC_USE_COUNT;
 
 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,50))
        MOD_INC_USE_COUNT;
-#endif 
+#endif
 
        return 0;
 
 
        return 0;