Please compare the definition of your read fuction and what is given in the struct file_operations Regards, Shine Mohamed Jabbar On Thu, 2004-08-05 at 16:23, Shakthi Kannan wrote: > Greetings! > > I am a new member and this is my first post. > > I have written a sample device driver (on 2.6.5-mm1 kernel) and I am > getting this "read.c:45: warning: initialization from incompatible > pointer type" while compiling the code. Everything works in the code, > except the read function. The complete problem and code can be viewed > here: > > http://www.linuxforum.com/forums/index.php?showtopic=87071 > > I have declared the skull_fops like this and the line 45 is the line > containing the "read: skull_read": > > struct file_operations skull_fops = { > read: skull_read, > open: skull_open, > release: skull_release, > }; > > I have used the skull_read function like this: > > int skull_read (struct inode *inode, struct file *file, char *buffer, int count) > > I would appreciate if you can tell me what is the error and how I can > get this working. > > Thanks, > > K Shakthi -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/