In my driver\'s file_operations structure, I have:
struct file_operations Fops = {
read: device_read,
write: device_write,
unlocked_ioctl: device_io
Uhm, I solved this. It is also required to change signature of device_ioctl function. There is no inode parameter, and also the function should return long. Just like in following patch:
-static int st_ioctl(struct inode *inode, struct file *file,
- unsigned int cmd_in, unsigned long arg)
+static long st_ioctl(struct file *file, unsigned int cmd_in, unsigned long arg)
{
(from: http://linux.derkeiler.com/Mailing-Lists/Kernel/2008-01/msg06799.html)