* Version lincan-0.2 9 Jul 2003
*/
-#include <linux/autoconf.h>
-
-#define __NO_VERSION__
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/sched.h>
-#include <linux/delay.h>
-#include <asm/irq.h>
-#include <asm/uaccess.h>
-
+#include "../include/can.h"
+#include "../include/can_sysdep.h"
#include "../include/main.h"
ssize_t can_write(struct file *file, const char *buffer, size_t length, loff_t *offset)
if ((ret=canque_get_inslot4id(qends, &qedge, &slot,
0, msg_buff.id, 0))<0){
DEBUGMSG("Buffer is full\n");
- if (file->f_flags & O_NONBLOCK)
- return -EAGAIN;
if(ret < -1)
return -EIO;
+ if (file->f_flags & O_NONBLOCK)
+ return -EAGAIN;
+
ret=canque_get_inslot4id_wait_kern(qends, &qedge, &slot,
0, msg_buff.id, 0);
if(ret<0) {