]> rtime.felk.cvut.cz Git - lincan.git/blobdiff - lincan/src/ioctl.c
LinCAN sources go through big white-space cleanup.
[lincan.git] / lincan / src / ioctl.c
index e6dee366a4fbc0b59fccda4216d117cb551cb767..d3582d054e5563a119134ef7ddcea9cc708fb599 100644 (file)
@@ -46,12 +46,12 @@ long can_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
        struct msgobj_t *obj;
        struct canchip_t *chip;
        struct canque_ends_t *qends;
        struct msgobj_t *obj;
        struct canchip_t *chip;
        struct canque_ends_t *qends;
-       
+
        if(!canuser || (canuser->magic != CAN_USER_MAGIC)){
                CANMSG("can_ioctl: bad canuser magic\n");
                return -ENODEV;
        }
        if(!canuser || (canuser->magic != CAN_USER_MAGIC)){
                CANMSG("can_ioctl: bad canuser magic\n");
                return -ENODEV;
        }
-       
+
        obj = canuser->msgobj;
        if (obj == NULL) {
                CANMSG("Could not assign buffer structure\n");
        obj = canuser->msgobj;
        if (obj == NULL) {
                CANMSG("Could not assign buffer structure\n");
@@ -92,14 +92,14 @@ long can_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
                case CONF_FILTER: {
 
                        /* In- and output buffer re-initialization */
                case CONF_FILTER: {
 
                        /* In- and output buffer re-initialization */
-                       
+
                        if(canuser->rx_edge0){
                                canque_set_filt(canuser->rx_edge0, arg, ~0, 0);
                        }
 
                        break;
                }
                        if(canuser->rx_edge0){
                                canque_set_filt(canuser->rx_edge0, arg, ~0, 0);
                        }
 
                        break;
                }
-               
+
                case CANQUE_FILTER: {
                        struct canfilt_t canfilt;
                        int ret;
                case CANQUE_FILTER: {
                        struct canfilt_t canfilt;
                        int ret;
@@ -110,11 +110,11 @@ long can_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
                        }
                        break;
                }
                        }
                        break;
                }
-               
+
                case CANRTR_READ: {
                        int ret;
                        struct canmsg_t rtr_msg;
                case CANRTR_READ: {
                        int ret;
                        struct canmsg_t rtr_msg;
-                       
+
                        ret = copy_from_user(&rtr_msg, (void*)arg, sizeof(struct canmsg_t));
                        if(ret) return -EFAULT;
                        ret = can_ioctl_remote_read(canuser, &rtr_msg, rtr_msg.id, 0);
                        ret = copy_from_user(&rtr_msg, (void*)arg, sizeof(struct canmsg_t));
                        if(ret) return -EFAULT;
                        ret = can_ioctl_remote_read(canuser, &rtr_msg, rtr_msg.id, 0);
@@ -135,11 +135,11 @@ long can_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
                        }
                        break;
                }
                        }
                        break;
                }
-               
+
                case CONF_BAUDPARAMS: {
                        struct can_baudparams_t params;
                        int ret;
                case CONF_BAUDPARAMS: {
                        struct can_baudparams_t params;
                        int ret;
-                       
+
                        ret = copy_from_user(&params, (void*)arg, sizeof(struct can_baudparams_t));
                        if(ret) return -EFAULT;
 
                        ret = copy_from_user(&params, (void*)arg, sizeof(struct can_baudparams_t));
                        if(ret) return -EFAULT;
 
@@ -162,7 +162,7 @@ long can_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
                        CANMSG("Not a valid ioctl command\n");
                        return -EINVAL;
                }
                        CANMSG("Not a valid ioctl command\n");
                        return -EINVAL;
                }
-               
+
        }
 
        return 0;
        }
 
        return 0;