vanilla 3.5: ioctl code sent from user level is corrupted
I wrote a device driver that gets IOCTL requests from a user level driver and read/write from/to PCI.
The module+driver works fine under vanilla 18.104.22.168
Now I want to run it under vanilla 3.5
So I recomopiled the module+driver+application with the new toolchain and the new kernel.
When I run it, the ioctl code sent from the application to the module is not the one I'm sending.
The IOCTL codes are assembled in the following way:
#define ACM_IOC_MAGIC 'k'
#define ACM_WRITE_WORD32_REQUEST_CODE _IOW(RCM_IOC_MAGIC,1,int)
What is the meaning of the third parameter ?
What am I doing wrong ?
Thank you in advance,
Solution: Invalid prototype of ioctl
The cause to the problem is that I used 4 parameters at the ioctl handler like in 22.214.171.124
I should declare as followed:
static long my_ioctl (struct file *file,unsigned int ioctl_num, unsigned long ioctl_param)
|All times are GMT -5. The time now is 10:53 PM.|