> I thought I could make fd=open("/dev/visu", 0) in init of the > driver 2 but I > get ooops.
To open a device from kernel mode, you need to: /* Bypass argument validity check in FS calls. See <asm/uaccess.h> */ mm_segment_t oldfs = get_fs(); set_fs(KERNEL_DS); fd=open("/dev/visu", 0) /* Restore argument validity check */ set_fs(oldfs); > I also need to make something like ioctl(fd, IO_Special... > )but the function > ioctl is unknown in the kernel. To have the ioctl, you should add to the beginning of your source file: #include <linux/unistd.h> /* Declare "ioctl" system call */ static inline _syscall3(int,ioctl,int,fd,int,request,void*,arg1) Regards, -------------------------------------------- Jean-Denis Boyer, Software Designer M5T Centre d'Excellence en T?l?com Inc. 4283 Garlock Street Sherbrooke (Qu?bec) J1L 2C8 CANADA (819)829-3972 x241 -------------------------------------------- ** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/