Messages in this thread Patch in this message | | | Date | Wed, 9 Jan 2002 16:13:59 -0800 | From | Nicholas Petreley <> | Subject | NVidia patch for kdev_t |
| |
Re: The fellow who noted that kdev_t breaks the current nv.c driver.
I'm just guessing here based on what other patches I've seen, so pardon me if this isn't the proper way to handle the change, or if I missed anything. But it worked for me and my GeForce3. This patch is against NVIDIA_kernel-1.0-2314.
--- nv.c Fri Nov 30 20:11:06 2001 +++ NVIDIA_kernel-1.0-2314/nv.c Thu Jan 3 17:18:42 2002 @@ -1146,11 +1146,11 @@
/* for control device, just jump to its open routine */ /* after setting up the private data */ - if (NV_DEVICE_IS_CONTROL_DEVICE(inode->i_rdev)) + if (NV_DEVICE_IS_CONTROL_DEVICE(minor(inode->i_rdev))) return nv_kern_ctl_open(inode, file);
/* what device are we talking about? */ - devnum = NV_DEVICE_NUMBER(inode->i_rdev); + devnum = NV_DEVICE_NUMBER(minor(inode->i_rdev)); if (devnum >= NV_MAX_DEVICES) { rc = -ENODEV; @@ -1257,7 +1257,7 @@
/* for control device, just jump to its open routine */ /* after setting up the private data */ - if (NV_DEVICE_IS_CONTROL_DEVICE(inode->i_rdev)) + if (NV_DEVICE_IS_CONTROL_DEVICE(minor(inode->i_rdev))) return nv_kern_ctl_close(inode, file);
NV_DMSG(nv, "close");
-- *********************************************************** Nicholas Petreley http://www.VarLinux.org nicholas@petreley.com http://www.computerworld.com http://www.petreley.org http://www.linuxworld.com Eph 6:12 *********************************************************** - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |