* NVidia patch for kdev_t
@ 2002-01-10 0:13 Nicholas Petreley
0 siblings, 0 replies; only message in thread
From: Nicholas Petreley @ 2002-01-10 0:13 UTC (permalink / raw)
To: linux-kernel
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
***********************************************************
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-01-10 0:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-01-10 0:13 NVidia patch for kdev_t Nicholas Petreley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox