Code:
diff -urN NVIDIA-Linux-x86_64-195.36.31-pkg2/usr/src/nv/nv.c NVIDIA-Linux-x86_64-195.36.31-pkg2-2.6.36-patched/usr/src/nv/nv.c
--- NVIDIA-Linux-x86_64-195.36.31-pkg2/usr/src/nv/nv.c 2010-06-03 12:46:41.000000000 -0400
+++ NVIDIA-Linux-x86_64-195.36.31-pkg2-2.6.36-patched/usr/src/nv/nv.c 2010-08-23 16:25:54.000000000 -0400
@@ -322,7 +322,8 @@
int nv_kern_mmap(struct file *, struct vm_area_struct *);
#endif /* NV_USER_MAP */
unsigned int nv_kern_poll(struct file *, poll_table *);
-int nv_kern_ioctl(struct inode *, struct file *, unsigned int, unsigned long);
+//int nv_kern_ioctl(struct inode *, struct file *, unsigned int, unsigned long);
+int nv_kern_ioctl(struct file *, unsigned int, unsigned long);
long nv_kern_unlocked_ioctl(struct file *, unsigned int, unsigned long);
long nv_kern_compat_ioctl(struct file *, unsigned int, unsigned long);
void nv_kern_isr_bh(unsigned long);
@@ -414,9 +415,10 @@
static struct file_operations nv_fops = {
.owner = THIS_MODULE,
.poll = nv_kern_poll,
- .ioctl = nv_kern_ioctl,
+// .ioctl = nv_kern_ioctl,
+ .unlocked_ioctl = nv_kern_ioctl,
#if defined(HAVE_UNLOCKED_IOCTL)
- .unlocked_ioctl = nv_kern_unlocked_ioctl,
+// .unlocked_ioctl = nv_kern_unlocked_ioctl,
#endif
#if defined(NVCPU_X86_64) && defined(HAVE_COMPAT_IOCTL)
.compat_ioctl = nv_kern_compat_ioctl,
@@ -2833,7 +2835,7 @@
*/
int nv_kern_ioctl(
- struct inode *inode,
+// struct inode *inode,
struct file *file,
unsigned int cmd,
unsigned long i_arg)
@@ -3016,7 +3018,8 @@
unsigned long i_arg
)
{
- return nv_kern_ioctl(file->f_dentry->d_inode, file, cmd, i_arg);
+// return nv_kern_ioctl(file->f_dentry->d_inode, file, cmd, i_arg);
+ return nv_kern_ioctl(file, cmd, i_arg);
}
long nv_kern_compat_ioctl(
@@ -3025,7 +3028,8 @@
unsigned long i_arg
)
{
- return nv_kern_ioctl(file->f_dentry->d_inode, file, cmd, i_arg);
+// return nv_kern_ioctl(file->f_dentry->d_inode, file, cmd, i_arg);
+ return nv_kern_ioctl(file, cmd, i_arg);
}
/*